即使在所有配置之后,使用 xdebug 和 xampp 在 vscode 中进行 PHP 调试也无法正常工作。
这是我的 php.ini 文件配置:
zend_extension = D:\Xampp\php\ext\php_xdebug-3.0.0-7.3-vc15-x86_64.dll
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1Run Code Online (Sandbox Code Playgroud)
这是 json 文件
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}"
}
]
}Run Code Online (Sandbox Code Playgroud)