我已安装Xdebug 2.1,并且使用PHP 5.2.13运行。它可以成功连接到多个DBGP客户端(即xdebug.remote_log
来回显示通信,并且客户端本身也显示传入连接),但它不会停在断点处。我试过NetBeans,MacGDBp以及与Xdebug捆绑在一起的命令行debugclient
。Xdebug成功连接到DBGP客户端,但不会在断点处停止
一个典型的交换是这样的:
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
的NetBeans试图设置断点,这些都是由Xdebug的承认:
<- breakpoint_set -i 7 -t line -s enabled -f file:///mnt/hgfs/htdocs/mycompany/index.php -n 9
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" state="enabled" id="139360004"></response>
然而,Xdebug的仍然拒绝停止!
哇,这真的救了我后,得到一些奇怪的行为配置与MacGDBP远程调试。我可以看到xdebug.remote_log中的连接成功,并且客户端正在接收连接,但连接迅速被丢弃。客户也没有输出。按照你的建议改变了“extension = xdebug.so”,并且一切都很好。 – milesw 2013-05-14 10:59:44
您先生让我的一天。如果可以的话,我会赞扬一千次。 – Bgi 2013-06-08 15:40:17