GDB:在非源文件上设置断点

时间:2012-10-30 00:42:10

标签: gdb

如果我将GDB附加到httpd进程并想在htdocs文件夹中的文件上设置断点,即当在example.php的第3行调用'echo'时,我该怎么做?

1 个答案:

答案 0 :(得分:0)

您不能使用GDB来调试PHP程序(example.php)。请参阅PHP Debugging with Breakpoints - case studies, examples..?,了解如何使用xdebug2模块设置PHP远程调试。

提示:在echo中的example.php行之前插入xdebug_break()是设置断点的简便方法。

请使用php而不是gdb标记PHP开发问题。