Skip to content

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

Description

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

Activity

  1. testforstephen commented on Sep 6, 2022

    @testforstephen
    ContributorAuthor

    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"

  2. testforstephen commented on Apr 26, 2023

    @testforstephen
    ContributorAuthor

    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
  3. NickJAllen commented on Jun 12, 2023

    @NickJAllen

    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?

  4. FieteO commented on Jun 26, 2024

    @FieteO

    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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions