php - PHP 7.3 Listen for Xdebug 在带有 WAMP 的 VSCode 中不起作用
问题描述
我想通过Listen for XDebug使用 Chrome 调试 php 文件 ,调试器无法捕捉断点,并且在启动当前打开的脚本工作正常时浏览器上没有显示任何内容
下面是我的 vs json 和 php.ini 文件。我的 WAMP 服务器使用端口 8081,我要调试的文件位于E:\Softwares\Installed\wampServer\www\store
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"wamp/www/": "E:/Softwares/Installed/"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
php.ini
[xdebug]
xdebug.remote_autostart = On
xdebug.remote_enable = On
zend_extension="E:/Softwares/Installed/wampServer/bin/php/php7.3.21/zend_ext/php_xdebug-2.9.6-7.3-vc15-x86_64.dll"
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = Off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="E:/Softwares/Installed/wampServer/tmp"
xdebug.show_local_vars=0