余者不述;只记录关键步骤。
在配置文件launch.json中增加以下代码,实现vscode调试PHP代码。
{
// 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": "Listen for XDebug",
"type":"php",
"request":"launch",
"port":9001
},
{
"name":"Launch currently open script",
"type":"php",
"request":"launch",
"program":"${file}",
"cwd":"${fileDirname}",
"port":9001
}
]
}