microsoft / microsoft/debug-adapter-protocol

Support breakpoints for specific threads

Open
#536 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.8k
Forks
173
Avg merge
7d 7h
Merged PRs (30d)
2

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the breakpoint request and the LLDB breakpoint modify syntax shown in the issue, especially the -t/--thread-id option. Review the debug adapter protocol's breakpoint specification and determine how thread-specific restrictions should be represented; done means the protocol clearly supports selecting one or more thread IDs for a breakpoint.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.