Skip to content

Support "Suspend VM" and "Suspend Thread" Breakpoint Modes #608

Description

I propose we support the Java breakpoint suspend modes by adding the "breakpointModes" capability and honoring when breakpoints are set.

Activity

  1. tsmaeder commented on Oct 16, 2025

    @tsmaeder
    Author

    As I read the VS Code UI code, this should then just show up in the UI, as well.

  2. github-actions commented on Oct 16, 2025

    @github-actions

    Hi Thomas Mäder (@tsmaeder), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

    Suggestions

    • Review the Debug Adapter Protocol (DAP) specification for SetBreakpointsRequest to understand how capabilities are declared and how breakpoint payloads are structured:

    • In the vscode-java-debug extension:

      1. Add a new capability in the initialize response (e.g. breakpointModes) in javaDebugProtocol.ts.
      2. Extend your client-side UI to allow users to choose between VM and Thread suspend modes when setting a breakpoint.
      3. In JavaBreakpointManager.ts, inspect the incoming breakpoint payload for the chosen mode and call the corresponding JDI API:
        • BreakpointRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL) for “Suspend VM”
        • BreakpointRequest.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD) for “Suspend Thread”
      4. Test that the adapter honors the selected mode by verifying whether all threads suspend or only the breakpoint’s thread suspends.

    Labels

    • enhancement

    Duplicates

    None

    Other references with low confidence

    The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

  3. tsmaeder commented on Oct 17, 2025

    @tsmaeder
    Author

    I'm working on an PR for this. Should be landing next week.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions