I installed PHP debug extension in VSCode, installed Xdebugger also by analyzing phpinfo()
file. Now I am unable to debug the file (forward arrows are not coming for debugging).
How to write launch.json file and start debugging?
settings.json
{
"launch": {
"configurations": [
{
"name": "Launch currently open script with Xdebug 2 (Legacy)",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.remote_enable=yes",
"-dxdebug.remote_autostart=yes"
],
"env": {
"XDEBUG_CONFIG": "remote_port=${port}"
}
},
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
}
]
}
}