Perl 调试器总是说:“可用的编辑器支持”。我相信每个人都可以看到这个,但是我该如何使用它?
my-computer$ perl -de2
Loading DB routines from perl5db.pl version 1.33
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(-e:1): 2
DB<1>
顺便说一下,我在 Linux/Ubuntu 11.04 上得到了上面的提示(Natty Narwhal)机器。
最佳答案
消息有点困惑。它告诉您它可以支持在编辑器中运行,而不是说有一个特殊的 Perl 调试器编辑器。
Perl 调试器可以检测它是在与终端通信还是在编辑器中运行。这控制了很多事情,最大的是调试器是打印任何东西还是让编辑器来处理显示。如果您真的很好奇,请查看 the debugger code对于 $slave_editor
。
为什么感觉有必要将此告知用户?我做了一些挖掘和调试器 used to only support Emacs debugging .通知用户“Emacs 支持可用”比一些编辑器某处将与调试器一起工作更有用。 Emacs 消息进来了 with the first version of the debugger sprung fully formed from the head of Ilya .
Perl 调试器实际上也是三个实体。 perl5db.pl 脚本,DB API ,以及这两者使用的语言本身的调试 Hook 。编辑器可以使用 perl5db.pl,也可以直接使用 DB 对话。
有一些编辑器可以连接到 Perl 调试器。一种是 Emacs,您可以先在 Emacs 中打开一个 Perl 程序并使用 M-x perldb
。 Komodo和 Padre也有调试器支持。
关于linux - 我如何使用 Perl 调试器的 *supported* 编辑器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13211060/