Reputation: 1272
I'm using VSCode + PHP Debug extension, and when I debug my application, the script execution is halted on any exception, even if it has been caught.
Extension: https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug
{
"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
}
]
}
XDebug settings
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.show_exception_trace=0
Upvotes: 3
Views: 256
Reputation: 1651
I also had the same issue Xdebug being stopped at pretty much everything it goes through.
If you go to the Debug
panel of VS Code and at the bottom check for the Breakpoints
section. Disable Notices, Exceptions, Everything and Warnings (or whatever suits you best).
I basically keep the aforementioned 4 settings unticked so that it will only stop at my breakpoints.
Screenshot of the settings: Imgur (Unfortunately, SO's image uploading plugin doesn't seem to work for me!)
Hope this helps :)
Upvotes: 2