vscode-java-debug
vscode-java-debug copied to clipboard
[Feature] Exception filter for handled/unhandled exception
We need have a look at the user experience for supporting this. There are already some discussions about this in VS Code. See https://github.com/Microsoft/vscode/issues/11552
https://github.com/Microsoft/vscode/issues/58162
Will impl like this(available in 0.14.0)

What's the status of this? Was it merged?
Not fully supported yet.
so far we have exposed a setting java.debug.settings.exceptionBreakpoint.skipClasses to skip the specified classes when breaking on exception. Maybe we should add a new setting java.debug.settings.exceptionBreakpoint.allowClasses as well to specify what exception breakpoints you can enable.
Exactly you need to specify the set of exception on which you want to break. This is how both eclipse and intellij are working. This is very basic stuff, I'm quite surprised it isn't there yet.
This has been supported in 0.50.0 version.
Here is how to enable exception breakpoint on the specified exception type:
- Configure the exception types in the setting
java.debug.settings.exceptionBreakpoint.exceptionTypes.
"java.debug.settings.exceptionBreakpoint.exceptionTypes": [
"java.lang.NullPointerException" // fully qualified class name
]
- Go to Breakpoint view, toggle the CaughtException or UncaughtException.

Thank you for implementing this but I still don't get how it should work. I want to set an exception breakpoint so that it will alway break when a certain exception is thrown (caught or uncaught) and to only break when another exception is thrown (but only when uncaught). So I want to specify the caught and uncaught behaviour separately for each exception type. But it seems that how this is implemented the caught and uncaught setting cannot be specified separately for each exception type. Or am I missing something?
So I want to specify the caught and uncaught behaviour separately for each exception type. But it seems that how this is implemented the caught and uncaught setting cannot be specified separately for each exception type.
Based on current UI limitation, you can set caught/uncaught flag for all target exception types, but not individually for each exception type.
Do you think this limitation will be lifted some time?
Has this been closed for good? I used individual exception breakpoints a lot in Eclipse, would really make use of it in VS Code now.