相关疑难解决方法(0)

Xdebug忽略了断点

我目前正在尝试让Xdebug在我们的开发服务器上工作.作为客户端我使用netbeans和连接到目前为止工作没有问题.但是当我尝试在netbeans中设置一个断点时,它就会被忽略.

是的,我已经谷歌搜索了几个小时,并在这里找到了一些完全符合我描述的问题: SO 1 SO 2

但这似乎并没有为我解决.该Xdebug模块通过zend_extension = path/to/xdebug加载.所以在

/etc/php5/conf.d/xdebug.ini

我还查看了php5/apache和php5/cli php.ini以确保它没有加载extension = somewhere那里.我还检查了phpinfo()找到的"解析的其他.ini文件",似乎没有其他地方加载.

通过执行php -m我可以看到加载的Xdebug模块

[PHP Modules]

并在

[Zend Modules]

不确定这是否表明它仍然被加载两次或者它是否正常?如果我zend_extension=/path/to/xdebug.soconf.d/xdebug.ini它删除它仍然不再加载.所以我真的认为它只是装在那里.

如果我设置了remote_log选项,则看到Netbeans正在尝试设置某些内容:

<- breakpoint_set -i 452 -t line -s enabled 
   -f file:///http:/development.xxx.de/users/itsame/index.php -n 15
-> <response xmlns="urn:debugger_protocol_v1"
    xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" 
          transaction_id="452" state="enabled" id="258870001">   
    </response>
Run Code Online (Sandbox Code Playgroud)

但它似乎没有任何效果(看起来几乎和我上面发布的其他SO问题一样.但是如果我在php代码中做了一个手动xdebug_break(),它就会正确地处理它.

PHP版本是5.2.6,Xdebug是2.1.我有什么建议可以看看下一个吗?

php eclipse netbeans xdebug

19
推荐指数
1
解决办法
2万
查看次数

Xdebug成功连接到DBGP客户端,但不会在断点处停止

我安装了Xdebug 2.1,并运行PHP 5.2.13.它可以成功连接到多个DBGP客户端(即xdebug.remote_log显示来回通信,客户端本身也显示传入连接),但它不会在断点处停止.我尝试过NetBeans,MacGDBp以及debugclient与Xdebug捆绑在一起的命令行.

典型的交易所看起来像:

Log opened at 2010-07-20 09:33:17
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///mnt/hgfs/htdocs/mycompany/index.php" language="PHP" protocol_version="1.0" appid="14371" idekey="macgdbp"><engine version="2.1.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2010 by Derick Rethans]]></copyright></init>

<- status -i macgdbp
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="macgdbp" status="starting" reason="ok"></response>

<- step_into -i macgdbp
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="macgdbp" status="stopping" reason="ok"></response>

<- status -i macgdbp
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="macgdbp" status="stopping" reason="ok"></response>

Log closed at 2010-07-20 09:33:18
Run Code Online (Sandbox Code Playgroud)

NetBeans尝试设置断点,Xdebug承认这些断点:

<- breakpoint_set -i 7 …
Run Code Online (Sandbox Code Playgroud)

php debugging netbeans breakpoints xdebug

6
推荐指数
1
解决办法
5486
查看次数

标签 统计

netbeans ×2

php ×2

xdebug ×2

breakpoints ×1

debugging ×1

eclipse ×1