xDebug未在断点处停止


xDebug not stopping at breakpoint

我已经在谷歌和stackoverflow中搜索了几个小时。。。。。找不到原因。。。

我的应用程序托管在Centos 6.5 Apache中,并在我的开发机器上使用Visual Studio+PHP工具进行调试。

它运行得非常好,直到我对Centos机器进行了一些更新、重新启动、couchdb安装/配置(以及许多其他事情),然后我注意到xdebug不再在断点处停止,它只在出现异常或我在PHP脚本中写出xdebug_break()时停止。。。

我试着禁用SELinux、Iptables,但也无济于事。

然后我查看了xdebug.log文件,它给出了如下随机错误:

I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/ec2-user/webapps/webapps/PVPCardGame/index.php" language="PHP" protocol_version="1.0" appid="$
<- breakpoint_set -i x0-10000 -t exception -x "Fatal error"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="x0-10000" id="39890001"></response>
<- breakpoint_set -i x1-10001 -t exception -x "Parse error"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="x1-10001" id="39890002"></response>
<- breakpoint_set -i x2-10002 -t exception -x "Unknown error"
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="x2-10002" id="39890003"></response>
<- feature_get -i 3 -n max_children
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="3" feature_name="max_children" supported="1"><![CDATA[32]]></response>
<- breakpoint_set -i 4-0 -t line -f file:///home/ec2-user/webapps/webapps/PVPCardGame_fuel/app/classes/controller/user.php -n 104
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="4-0" id="39890004"></response>
<- breakpoint_set -i 5-1 -t line -f file:///home/ec2-user/webapps/webapps/PVPCardGame_fuel/app/classes/controller/user.php -n 108
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5-1" id="39890005"></response>

所以它确实连接到了我的客户端,但我不知道什么错误日志。。。

XDebug 2.3.2版PHP版本5.4.41

我已经从Linux机器上卸载了PHP 5.4.41,并重新安装到更高版本的PHP 5.5.27中。突然间,一切都在起作用。

我相信这是因为xDebug的工作原理,它在Linux的PHP上运行,并将调试信息发送到我的本地机器,这在不同版本的PHP 5.6.8中得到了解释……这就是为什么它不起作用。