Putting the line kill 2, $$ will cause the debugger to break at that point in the source (on Unix, anyway).
I had never seen that trick before. Cool. I have been using this one instead:
That causes the debugger to enter "single-step" mode, which amounts to programmatically setting a breakpoint in the next executable line. This is particularly useful for causing the debugger to stop at places that happen before the first executable line, e.g.:$DB::single = 1;
The code above will enable stepping through the loading of 'Foo', which otherwise would happen before the place at which DB normally starts (i.e. the first executable line). I see that kill 2, $$ works well for this too. One more trick for the bag.BEGIN { $DB::single = 1; } use Foo;
the lowliest monk
In reply to Re^2: Interactive scripting with DB
by tlm
in thread Interactive scripting with debugger
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |