Question Details

No question body available.

Tags

visual-studio-code vscode-debugger

Answers (1)

Accepted Answer Available
Accepted Answer
November 3, 2025 Score: 1 Rep: 61,283 Quality: High Completeness: 80%

Not 100% sure that this is what you're looking for, but you could try using the VS Code extension API, which has a DebugSession.customRequest(command: string, args?: any): Thenable method. You can get the currently active debug session with debug.activeDebugSession. From the argument signature, it looks like an access point to send Debug Adapter Protocol requests. A list of DAP requests and their individual argument signatures can be found in the DAP spec.

Specific debug technologies may have something more specialized that you could choose to use as well. Ex. GDB has a Python API. GDB can also be interfaced with through GDB/MI (I'm pretty sure this interface is part of what cpptools uses to implement its debug adapter for GDB/LLDB). LLDB has a Python API. Visual Studio has a debugger API, but I don't know if it would support what you want.