【问题标题】:xDebug not stopping at breakpointxDebug 不在断点处停止
【发布时间】:2015-09-11 11:45:17
【问题描述】:

我已经在 google 和 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

【问题讨论】:

    标签: php linux visual-studio xdebug centos6


    【解决方案1】:

    我已经从我的 Linux 机器上卸载了 PHP 5.4.41 并重新安装到更高版本的 PHP 5.5.27 中。 突然之间就开始工作了。

    我相信是因为 xDebug 是如何工作的,它在 Linux 的 PHP 上运行并将调试信息发送到我的本地机器,这在不同版本的 PHP 5.6.8 中被解释......这就是为什么不工作。

    【讨论】:

      猜你喜欢
      • 2011-04-30
      • 1970-01-01
      • 2018-03-31
      • 1970-01-01
      • 1970-01-01
      • 2020-02-01
      • 2012-12-15
      • 2014-11-22
      • 2014-06-19
      相关资源
      最近更新 更多