3

我对 XDebug 有一个奇怪的问题。

首先是项目设置(它已完全弃用,但它是一个客户项目,我无法改变任何事情):

  • PHP 4.4.9
  • XDebug 2.0.2(PHP 4.4 的最后一个稳定版本)
  • 网豆 7.0
  • 轻松调试

我配置了 XDebug 和 Netbeans,一切正常。

zend_extension="/home/user/xdebug-2.0.2/modules/xdebug.so"
xdebug.remote_enable = 1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=10.0.1.26
xdebug.remote_port=9000
xdebug.remote_log="/etc/apache2/logs/xdebug_error.log"

让我头疼的是,如果我在 Netbeans 中按 Continue (F8),似乎什么也没有发生。XDebug 获得运行命令,但页面挂起(请参阅 XDebug Error.log)。似乎 XDebug 仍然阻止 PHP。如果我在 Netbeans 中终止 XDebug 会话,则页面将被处理。但是,在我终止会话后,我无法启动一个新会话,直到我重新启动 httpd。

Log opened at 2012-09-24 12:54:39
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="anonymised" language="PHP" protocol_version="1.0" appid="5813" idekey="netbeans-xdebug"><engine version="2.0.2"><<![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2007 by Derick Rethans]]></copyright></init>

<- feature_set -i 661 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="661" feature="show_hidden" success="1"></response>

<- feature_set -i 662 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="662" feature="max_depth" success="1"></response>

<- feature_set -i 663 -n max_children -v 31
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="663" feature="max_children" success="1"></response>

<- feature_get -i 664 -n max_data
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="664" feature_name="max_data" supported="1"><![CDATA[1024]]></response>

<- breakpoint_set -i 665 -t line -s enabled -f anonymised -n 21
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="665" state="enabled" id="58130001"></response>

<- run -i 666
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="666" status="break" reason="ok"><xdebug:message filename="anonymised" lineno="21"></xdebug:message></response>

<- stack_get -i 667
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="667"><stack where="{main}" level="0" type="file" filename="anonymised" lineno="21"></stack></response>

<- context_names -i 668
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="668"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context></response>

<- context_get -i 669 -c 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="669" context="0"><property name="a" fullname="$a" type="uninitialized"></property><property name="b" fullname="$b" type="uninitialized"></property><property name="value" fullname="$value" address="47887874207944" type="int"><![CDATA[0]]></property></response>

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

在我按了 Continue 几次之后,Netbeans 抛出了一个 Socket Exception(损坏的管道)。

希望可以有人帮帮我 :(

4

0 回答 0