I have installed VS Code and the PHP debugger.
I am using xampp.
I tried running the code (2) ways (listen and launch).
Add the following line in your lunch.json file :
"runtimeExecutable": "c:\\xampp\\php\\php.exe"
{
"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}",
"port": 9000,
"runtimeExecutable": "C:\\Program Files\\PHP\\v7.3\\php.exe"
}
]
}