【发布时间】:2019-03-31 23:32:14
【问题描述】:
我已从 Thinkpad 笔记本电脑转移到 HP Elitebook。我必须在我的新笔记本电脑中设置我的开发环境。在 Windows 10 Pro 64 位版本中设置我的 Visual Studio Code 和 XAMPP 后,我无法调试我的 PHP 代码。
我已经为 Visual Studio Code 正确安装了 Xdebug 扩展,并确保 php.ini 正确。这是我对php.ini 的设置(我使用的是放在E: 驱动器上的便携式XAMPP):
zend_extension = "E:\xampp\php\ext\php_xdebug-2.4.1-5.4-vc9.dll"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_log="E:\xampp\apache\logs\xdebug.log"
而我的 xdebug.log 显示信息如下:
Log opened at 2018-10-27 05:56:45
I: Connecting to configured address/port: localhost:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///E:/xampp/htdocs/absen/index.php" language="PHP" xdebug:language_version="5.4.3-dev" protocol_version="1.0" appid="7112" idekey="william"><engine version="2.4.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
Log closed at 2018-10-27 05:56:45
但我的 Visual Studio 代码不会在断点处停止。
我已经重新安装了我的 Visual Studio Code、XAMPP,并使用了另一个 Xdebug 版本,但它仍然无法正常工作。
我已经点击了这些链接:
- visual studio code PHP debugging not working
- xdebug won't stop at breakpoint
- xdebug breakpoint fail
- Xdebug successfully connects to DBGP clients, but won't stop at breakpoints
这些解决方案都不起作用。
【问题讨论】:
标签: php visual-studio-code xdebug