有没有办法连接perl用于控制程序调试的Perl调试器API?
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 .
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.
You can read about the perl debugger at perldoc perldebug and perldoc perldebtut . You can invoke the debugger with the -d
option, ie perl -d myscript.pl
.
See "Programming Perl" 20.5.1 -> "Writing your own debugger", also see perldoc perlvar $PERLDB.
What you want to do is to implement the DB::DB() sub.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.