Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to break on caught/uncaught exceptions by name or package namespace #1175

Closed
testforstephen opened this issue Jun 4, 2022 · 4 comments · Fixed by #1333
Closed

Allow to break on caught/uncaught exceptions by name or package namespace #1175

testforstephen opened this issue Jun 4, 2022 · 4 comments · Fixed by #1333

Comments

@testforstephen
Copy link
Contributor

"Ability to set exception breakpoint by name would be great. Caught / uncaught exception is not enough."

@testforstephen
Copy link
Contributor Author

Customer Verbatim:
I like the feature from other IDE where you set a exception break point by setting the particular exception we want to break on"

@testforstephen
Copy link
Contributor Author

This has been supported in 0.50.0 version.

Here is how to enable exception breakpoint on the specified exception type:

  1. Configure the exception types in the setting java.debug.settings.exceptionBreakpoint.exceptionTypes.
    "java.debug.settings.exceptionBreakpoint.exceptionTypes": [
       "java.lang.NullPointerException" // fully qualified class name
    ]
  1. Go to Breakpoint view, toggle the CaughtException or UncaughtException.
    image

@NickJAllen
Copy link

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?

@FieteO
Copy link

FieteO commented Jun 26, 2024

Through this issue, I just discovered that it's possible to break on certain types of exceptions. It would be great though, to be able to set that through the breakpoints menu in the bottom left corner where all currently active breakpoints are listed.

For me, this setting is rather something that I would activate (and deactivate) ad-hoc for the specific thing I am debugging and not something that I would have permanently configured in some config file...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants