Faster Perl debugging through crazy tricks?
I'm at work right now, waiting for some code to run in the Perl Debugger and I got to thinking. Right now I've set a break point and I've hit "c" for continue executing, and in the background the debugger is doing all these checks on every single line and slowing down the execution of my program like crazy. I know it's doing something because if I hit ^C is halts properly at its current point of execution. What if there were some way to speed this up?
DB > b $condition DB > $DB::breakpoints_only_mode = 1; DB > c
Setting $DB::breakpoints_only_mode essentially promises the debugger that you won't hit ^C or anything silly like that. The implementation would be something like...
- Set up a hook of some kind for all existing breakpoints, which turns debugger flags on, then checks the breakpoint, then turns debugger flags back off again.
- Turn off the debugger flag(s?)
- Continue running the code as normal
What do Smarter People Than Me think of this idea?
(of course it's entirely possible that the debugger isn't actually slowing down my code all that much... but it feels like it is?)