PHP xdebug仅在使用vscode的htdocs根路径中起作用

时间:2019-11-26 06:41:52

标签: php visual-studio-code xdebug

launch.json

{
    "name": "Listen for XDebug",
    "type": "php",
    "request": "launch",
    "port": 9000
},
{
    "name": "Launch currently open script",
    "type": "php",
    "request": "launch",
    "program": "${file}",
    "cwd": "${fileDirname}",
    "port": 9000
}

我正在尝试调试,但是断点仅在此json的开始处停止。其他调试功能,如单步执行(f5,f10,f11,停止(shift + f5)除外)均无效。

如果将launch.json文件移动到另一个文件夹,则调试正常。

我要使用xdebug。我应该将文件移到根文件夹吗?

0 个答案:

没有答案