Overview
Thevscode.debug namespace provides functions to start and control debug sessions, register debug adapters, and track debugging state.
Starting Debug Sessions
startDebugging
Start a debugging session.stopDebugging
Stop a specific debug session or all sessions.Debug Adapters
registerDebugAdapterDescriptorFactory
Register a debug adapter descriptor factory.registerDebugConfigurationProvider
Register a debug configuration provider.Properties
activeDebugSession
The currently active debug session orundefined.
activeDebugConsole
The currently active debug console.breakpoints
All breakpoints.Events
onDidStartDebugSession
Fires when a debug session is started.onDidTerminateDebugSession
Fires when a debug session terminates.onDidChangeActiveDebugSession
Fires when the active debug session changes.onDidChangeBreakpoints
Fires when breakpoints are added, removed, or changed.Breakpoint Management
addBreakpoints
Add breakpoints.removeBreakpoints
Remove breakpoints.Complete Example
Related Resources
Debugging Feature
Learn about VS Code’s debugging capabilities
Commands API
Register and execute commands