question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vscode.debug API should provide the current thread/stack frame ids

See original GitHub issue

Currently the vscode.debug API provides a way to send custom events to debug adapters. But it is missing one fairly important thing - there is no way to know what the current thread id / frame id is. So a debug adapter could maybe guess. But it feels like there should really be a way to query this.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:7
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
PaDebugcommented, Mar 30, 2022

@elazarcoh What do I need to do to write the API proposal?

I would propose extending the debug namespace by an event which fires when the user selected a different stack frame in the call stack window. For example:

export namespace debug {

/**
 * An event which fires when the user selected a different stack frame in the call stack window.
 */
export const onDidChangeSelectedStackFrame: Event<StackFrame>;

}

The interface StackFrame consists of two properties: frameId and associated threadId. This would provide enough information to update the thread and stack frame in the Debug Adapter via custom request.

export interface StackFrame {

/**
 * Id of the associated thread (DAP id).
 */
readonly threadId: number;

/**
 * Id of the stack frame (DAP id).
 */
readonly frameId: number;

}

What do you think about this?

1reaction
weinandcommented, Mar 3, 2022

@elazarcoh you can start just here. Please study some existing API items with the “api-proposal” label to learn how API proposals look like.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging in Visual Studio Code
To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and...
Read more >
How to detect when user changes Stack frame while ...
This works: await vscode.debug.onDidChangeActiveDebugSession(e => { console.log('CHANGE ACTIVE', e.id); }). It is fired when the user ...
Read more >
Wine Developer's Guide/Debugging Wine - WineHQ Wiki
A same process can have several different handles on the same kernel object. ... Wine implements most of the Windows debugging API.
Read more >
Known issues — nRF Connect SDK 2.1.99 documentation
The network mode string present in deviceInfo (nRF Cloud) and dev (Azure IoT ... improper HID feature report ID. In such case, the...
Read more >
Debug a multithreaded app - Visual Studio (Windows)
This window tells you that the thread does not have any code that the current debugger can display. For example, you may be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found