I’m working with a big, old, messy, bloated framework. It regularly goes well over 100 levels deep in subroutine calls. The Perl debugger sees fit to stop and inform me of this fact… over and over again.
Package::Stash::name(/usr/local/perl/5.10.1/lib/site_perl/5.10.1/Package/Stash.pm:21):
21: return $_[0]->{package};
100 levels deep in subroutine calls!
DB<1>
How do I make the Perl debugger not care about how big the stack is?
Thanks.
Add the line:
to the start of your program.
The following program runs to completion in the debugger:
outputting:
Without the
$DB::deep = 500;line, it stops at 100, the same as yours:That’s been tested successfully up to a stack depth of 50,000 (use 50000 in the
ifstatement and set$DB::deepto 50001). If your stack depth is greater than that, I suspect you should be re-engineering rather than debugging 🙂By the way, if you don’t want to touch the code at all, you can change that value in the debugger before running your code – just enter
$Db::deep=500;before you entercto run the code, or just set it in your.perldbfile: