php - 无法通过网页触发 VS 代码中的 xDebug 插件,并显示错误消息“连接读取 ECONNRESET”
问题描述
我在 Windows 10 上使用 VScode (1.43.1) + xDebug(2.9.3) 来调试我的 PHP (7.4.3 VC15 TS x64) 脚本。我已经按照 Xdebug 说明更新了 php.ini 和 VScode launch.json,并且能够在 cli 模式下调试脚本。
但是,我在 99% 的时间内未能通过网页触发断点,当我从网页启动 php 脚本时,在 VScode 调试控制台中,我收到“连接 x:读取 ECONNRESET”消息并且没有触发断点。但是,有时可能会到达断点。
这是我配置的 launch.json 文件:
enter code here
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "xDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "CLI",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
[xdebug]
zend_extension = C:\php\ext\php_xdebug-2.9.3-7.4-vc15-x86_64.dll
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back=1
xdebug.remote_port = 9000
xdebug.remote_handler=dbgp
我很感激你对此有所了解。
谢谢,吉米
解决方案
推荐阅读
- git - 从部分提交消息构建提交消息
- python - Django-channels 和 Firefox 连接问题
- python - Python PIL 问题 | OSError:无法打开资源
- javascript - 如何从 Electron 应用程序中隐藏菜单栏?
- oracle - 在 Oracle 中左连接以连接具有空值的列
- html - 如何在 bootstrap rounded d-flex 中使用 max-width
- typescript - 如何在返回 Observable 的函数中使用 promise/async?
- python - Python 多重继承和内存分配
- reactjs - 在没有水平空白的 NextJs 中显示图像
- driverkit - USBSerialDriverKit中设置IOTTYBaseName的问题