```{index} single: walkoptree_debug; B function ``` ```{index} single: B::walkoptree_debug; Perl function ``` # walkoptree_debug Get or set the `walkoptree` debug flag. ## Synopsis ```perl my $prev = B::walkoptree_debug(1); # enable B::walkoptree_debug($prev); # restore ``` When enabled, `B::walkoptree` also calls a `walkoptree_debug` method on each node before the regular visit method, which lets a back-end print diagnostics as it walks. Returns the previous flag value.