简体   繁体   English

如何与Perl调试器API连接?

[英]How can I interface with the Perl debugger API?

有没有办法连接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. 默认的Perl调试器没有设计用干净的API来进行交互,所以最简单的方法可能就是不使用它,而是使用Devel :: ebug ,它为另一个调试器提供API。 You can also trigger the debugger from inside your code, calling an interactive debugger session, with Enbugger . 您还可以使用Enbugger从代码中触发调试器,调用交互式调试器会话。

It's all in the perldebug , perldebguts , and DB documentation. 这些都在perldebugperldebgutsDB文档中。

In addition, I've written a Creating a Perl Debugger which should get you started. 另外,我写了一个创建一个Perl调试器 ,它可以帮助你入门。 I have a section on custom Perl debuggers in Mastering Perl too. 我在Mastering Perl中有一个关于自定义Perl调试器的部分。

You can read about the perl debugger at perldoc perldebug and perldoc perldebtut . 您可以在perldoc perldebugperldoc perldebtut上阅读有关perl调试器的信息 You can invoke the debugger with the -d option, ie perl -d myscript.pl . 您可以使用-d选项调用调试器,即perl -d myscript.pl

See "Programming Perl" 20.5.1 -> "Writing your own debugger", also see perldoc perlvar $PERLDB. 请参阅“编程Perl”20.5.1 - >“编写自己的调试器”,另请参阅perldoc perlvar $ PERLDB。

What you want to do is to implement the DB::DB() sub. 你想要做的是实现DB :: DB()子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM