create_debug_session
Start a debugging session to launch or attach to a running process for step-through debugging. Pass a port, processId, or debugger URI to attach in the same call.
Instructions
Create a new debugging session. Passing port, processId or an adapterConfig that names a target (a debugger URI: vmServiceUri, websocketAddress, vmServiceInfoFile; or a Flutter deviceId, for an app running on an Android device) attaches to a running process in the same call, with every attach argument attach_to_process takes (host alone does not); omit them for launch mode. Attaching pauses the target unless stopOnEntry is false
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Attach mode only: host to attach to (the adapter defaults it, usually 127.0.0.1). Does not trigger attach mode by itself | |
| name | No | Optional session name | |
| port | No | Debug port to attach to (triggers attach mode) | |
| timeout | No | Attach mode only: connection timeout in milliseconds, forwarded as-is; js-debug honours it (its own default is 10 s) and COBOL uses it as its manifest-build budget, the other adapters ignore it. A value longer than verifyTimeout means the verify deadline is what you hit | |
| language | Yes | Programming language for debugging | |
| processId | No | Process ID for local attach, language-specific (triggers attach mode) | |
| justMyCode | No | Attach mode only: only debug user code (skip library code) | |
| sourcePaths | No | Attach mode only: source paths for code mapping | |
| stopOnEntry | No | Attach mode only: same as attach_to_process.stopOnEntry — omitted means true, the target is paused after attach (possibly late, reported as pending:true). Pass false to attach to a live service without stopping it | |
| adapterConfig | No | Attach mode only: adapter-specific attach configuration merged into the attach config (see attach_to_process). Triggers attach mode when it names a debugger URI (vmServiceUri, websocketAddress) or vmServiceInfoFile | |
| verifyTimeout | No | Attach mode only: how long to wait (ms) for the debugger to report at least one thread after attaching before failing the attach (default: 20000, max: 600000) | |
| executablePath | No | Path to language executable (optional, will auto-detect if not provided) | |
| breakOnExceptions | No | Attach mode only: break when exceptions are thrown: "uncaught" pauses at uncaught exceptions at the crash site; "all" also pauses on caught/raised exceptions (language-dependent). Default "none" — attach sessions never apply a language default (unlike launch) |