Is there a way to interface the Perl debugger API which perl is using to control its debugging programmatically?
It's all in the perldebug, perldebguts, and DB documentation.
In addition, I've written a Creating a Perl Debugger which should get you started. I have a section on custom Perl debuggers in Mastering Perl too.
The default Perl debugger was not designed with a clean API to interact with, so the easiest way is probably not to use it, but to use Devel::ebug, which offers an API to an alternative debugger. You can also trigger the debugger from inside your code, calling an interactive debugger session, with Enbugger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With