Skip to content

Support breakpoints for specific threads #536

Open

Description

@eronnen

Currently it's achievable by setting a breakpoint condition like "(int)thread.gettid() == 5", but debuggers like LLDB support directly specifying thread id(s) for a breakpoint, which is much faster then evaluating the condition expression every time the breakpoint hits:

Syntax: breakpoint modify <cmd-options> [<breakpt-id | breakpt-id-list>]

 -t <thread-id> ( --thread-id <thread-id> )
            The breakpoint stops only for the thread whose TID matches this argument.  The token
            'current' resolves to the current thread's ID.

Activity

  1. DrSergei commented on Jun 3, 2025

    @DrSergei
    Contributor

    I am also interested in this feature. Looks like, we can use BreakpointMode to identify a thread when setting breakpoint. However, there is a problem, when I try to send CapabilitiesEvent with new breakpointModes, the VSCode ignore new values (registerBreakpointModes called once in initialize request). Does the VSCode team intend to improve the behavior of CapabilitiesEvent?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions