我正在使用vvv进行本地WordPress开发,无法让xdebug在断点上暂停。
我已经ssh\'ed入并设置xdebug\\u on命令phpinfo()显示remote\\u autostart和remote\\u enable这两个设置
我的xdebug客户端(VS代码)配置为在xdebug配置为广播的同一端口上侦听当我添加一个断点(例如,在WordPress的index.php中的第一行substance上)并告诉我的客户听,然后在我的浏览器中加载页面时,我希望xdebug在这一行暂停。这个期望是基于以前使用xdebug的情况。
这并没有发生,但xdebug和我的客户机似乎有联系。这就是我不明白的部分。
以下是xdebug日志:
[3918] Log opened at 2019-03-09 20:08:19
[3918] I: Connecting to configured address/port: 192.168.50.1:9000.
[3918] I: Connected to client. :-)
[3918] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///srv/www/wordpress-one/public_html/index.php" language="PHP" xdebug:language_version="7.2.15-1+ubuntu14.04.1+deb.sury.org+1" protocol_version="1.0" appid="3918" idekey="VVVDEBUG"><engine version="2.7.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2019 by Derick Rethans]]></copyright></init>
[3918]
[3918] <- breakpoint_list -i 1
[3918] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"></response>
[3918]
[3918] <- breakpoint_set -i 2 -t line -f file:///e:/work/vvv/VVV/wordpress-one/public_html/index.php -n 14
[3918] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="39180029"></response>
[3918]
[3918] <- breakpoint_list -i 3
[3918] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="3"><breakpoint type="line" filename="file:///e:/work/vvv/VVV/wordpress-one/public_html/index.php" lineno="14" state="enabled" hit_count="0" hit_value="0" id="39180029"></breakpoint></response>
[3918]
[3918] <- breakpoint_list -i 4
[3918] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="4"><breakpoint type="line" filename="file:///e:/work/vvv/VVV/wordpress-one/public_html/index.php" lineno="14" state="enabled" hit_count="0" hit_value="0" id="39180029"></breakpoint></response>
[3918]
[3918] <- run -i 5
[3918] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="5" status="stopping" reason="ok"></response>
[3918]
[3918] <- stop -i 6
[3918] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="6" status="stopped" reason="ok"></response>
[3918]
[3918] Log closed at 2019-03-09 20:08:19
它显示了xdebug理解我的断点、连接到客户端以及注册浏览器对页面的加载。
(虽然这可能更像是xdebug的东西,但它都是基于vvv设置的,而vvv设置是关于WordPress的。)