in reply to In the art of Perl Debugger Mastery, I seek enlightenment

There's quite a lot to the debugger beyond just perl5db.pl itself.

Since the debugger is actually two parts, the hooks into the Perl interpreter and the code that manipulates these hooks, there's an awful lot one can do with the debugger interface beyond just debugging. As you've noted, Devel::NYTProf and Devel::Cover both use these same hooks, but to watch what the program does instead of interfere with the process.

If you're interested in learning some more about how a program executes (whether tracing it, gathering data about it, or otherwise fiddling about with it as it runs), the debugger hooks provide a useful if not simple interface to do that. Read perldebguts for more details on the hooks themselves; if you want to understand better how the debugger actually does stuff, read the debugger source, which contains extensive comments explaining how things work and how they get done. I recommend actually reading the raw source code rather than running it through perldoc, because the explanations make a lot more sense when you see the explanations and see the code that implements it at the same time.

  • Comment on Re: In the art of Perl Debugger Mastery, I seek enlightenment