Most of the time, I have no problems Xdebug debugging my PHP code in VS Code. But lately, VS Code has started ignoring my breakpoints and instead stopping at random function declarations.
i.e. it will stop at function x($a) in the function below instead of stopping at the breakpoint:
function x($a) {
// Some code, including a line with a breakpoint
}
Even though the debugging stops at function declarations, I can't step into the code in the functions. Aka. I can't debug anything :panic:
My launch.json:
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9090
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9090
}
]
Any ideas for fixing this, so my Xdebug debugging will start behaving again?
I have tried restarting VS Code and Apache + changed port numbers. Didn't help.
Versions on my system:
- System: Windows NT LAPTOP-612BINLI 10.0 build 19041 (Windows 10) AMD64
- Apache Version: Apache/2.4.51 (Win64) OpenSSL/1.1.1l PHP/7.3.31
- Xdebug Version: 2.8.1