vscode-php-debug
vscode-php-debug copied to clipboard
Add ability to ignore certain exceptions
Not a "bug", but it would be nice if we had the ability to ignore specific exceptions. When using Visual Studio we had the ability to do this via comment flags that would tell the editor to not stop on that error. It would be nice if there was some way to implement that in VS Code.
+1
+1
Awesome idea, I would pay for someone to implement this.
For now, the best way I could find is to ignore the file that generates the Exception I want to ignore in launch.json:
"configurations": [
{
"name": "php docker (9001)",
"type": "php",
"request": "launch",
"port": 9001,
"log": false,
"stopOnEntry": false,
"pathMappings": {
"/sites/": "${workspaceRoot}/sites/",
"/sites/api/html/": "${workspaceRoot}/",
"/sites/logs/html/": "${workspaceRoot}/"
},
"ignore": [
"**/Encryption/Encrypter.php",
]
},
Hi. I really want to do this as I feel it's a key component of any decent debugger.
I think there is still no native UI support for this in VS Code. We could "abuse" the currently available function breakpoints interface, but that would probably not be that user friendly.
An "all out" solution would extend the UI and somehow hook into the display of exceptions to add a menu "ignore this exception".
Also if we want to provide a list of known exceptions, we'd need to integrate with a language service extension...
Let me know if you feel something like this could be useful, that should be easy enough to implement:

+1
For anyone else discovering this issue, this feature has been supported with ignoreExceptions setting since v1.32.0