XP is just a number | |
PerlMonks |
Debugger demos/snippetsby LanX (Saint) |
on Sep 02, 2021 at 12:32 UTC ( [id://11136363]=perlquestion: print w/replies, xml ) | Need Help?? |
LanX has asked for the wisdom of the Perl Monks concerning the following question:
Hi We had many debugger questions lately which made me meditate about better ways to communicate features. Before reinventing the wheel, are there any selfcontained solutions with standalone debugger demos which can be used to show and test features? I was thinking of something semantically like (just an untested sketch)
which sets a breakpoint and runs it? (this is not meant as replacement for $DB::single ) FWIW I know perl5db's source command and I somehow remember a way to pass a queue of commands via afterinit in .perldb
sub afterinit { push @DB::typeahead, "b 4", "b 6"; } Which would attempt to set breakpoints on lines 4 and 6 immediately after debugger initialization. Note that @DB::typeahead is not a supported interface and is subject to change in future releases.
So this can be done with temporary .perldb files, I'd rather avoid this with an embedded format.
Cheers Rolf
Back to
Seekers of Perl Wisdom
|
|