Skip to content

Debugging: Support single-thread execution requests #166450

Open

Description

DAP execution requests (continue, next, stepIn etc.) support two modes:

  • The default mode, where execution requests resume all threads.
  • A single-thread mode, where execution requests only resume a single thread.

It seems VS Code always uses the default mode (even when using the inline buttons on each thread in the Call Stack window). For debug adapters that support single-thread execution requests, it would be great if there was some way to perform them from VS Code. Some ideas for how this could work:

  • A button in the debug toolbar that globally toggles between the modes. All continue/next/stepIn etc. actions taken by the user would use the currently selected mode.
  • Separate UI for single-thread execution control. For example, the debug toolbar could perform actions on all threads, whereas the inline buttons shown when hovering over a thread in the Call Stack window could perform actions only on that thread. To me at least, it's a bit confusing that pressing the inline 'Continue' button on a thread also resumes all other threads.

Activity

  1. added
    debug
    on Nov 16, 2022
  2. roblourens commented on Nov 17, 2022

    @roblourens
    Member

    VS Code hasn't adopted the singleThread flag but the DA also needs to support this, signaled by setting supportsSingleThreadExecutionRequests. Which DA are you trying to use this for?

  3. added
    feature-request
    on Nov 17, 2022
  4. added this to the Backlog milestone on Nov 17, 2022
  5. HampusAdolfsson commented on Nov 18, 2022

    @HampusAdolfsson
    Author

    I am a developer on IAR System's C-SPY Debug extension and am in the process of implementing multicore debugging support for it. With that, our DA will have support for the singleThread flag, but we're missing a frontend to make use of that support.

    As a point of interest, the debugger in our standalone IDE (Embedded Workbench) also has this feature, using a button that toggles between the single-thread and all-threads modes.

  6. softwareCobbler commented on Jan 29, 2023

    @softwareCobbler

    Hi, I have the same problem - an in-house DAP tool that is setting supportsSingleThreadExecutionRequests but VsCode doesn't really expose UI for it or craft requests considering it.

    I looked into adding a context menu with a custom action to the debug/callstack/context contribution point, but the desired DAP info is not present in the invoked callback (would need at least threadID), and it's not clear if the response to manually invoking a DAP continue request from the callback would be intercepted by VsCode and "do the right thing", or if it would just shuttle the response back to the callsite while not otherwise reacting to it.

    Put me down as a vote for Hampus Adolfsson (@HampusAdolfsson)'s suggestion to toggle UI between <current thread> (as per thread/frame pane) and <all threads>.

  7. kusmour commented on May 29, 2026

    @kusmour

    Hi! Just tried to support such feature for lldb-dap (native debugging has good support for single thread execution) and found out this is not properly supported in VSCode. Any timeline on supporting this yet? Thanks

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

Metadata

Metadata

Assignees

Labels

debugfeature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions