debug_attach
Attach a debug adapter to an already-running process and bind breakpoints before it resumes, so suspended programs can be stopped for inspection.
Instructions
Attach a debug adapter to an already-running process. Pass breakpoints here rather than afterwards: they bind before the debuggee resumes, which is the only reliable way to stop a process started suspended (e.g. JDWP suspend=y). With breakpoints or exception breakpoints, waits and reports stopped, terminated, or timeout.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"adapter": "<adapter>"
},
"name": "debug_attach"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Host to attach to (default: localhost) | |
| port | No | Debug port to attach to | |
| adapter | Yes | Adapter type to use | |
| timeout | No | Wait timeout in milliseconds (default: 30000) | |
| processId | No | PID of process to attach to | |
| breakpoints | No | Breakpoints to bind before the debuggee resumes | |
| waitForStop | No | Wait for stopped/terminated outcome; defaults to true when breakpoints or exception breakpoints are given | |
| attachConfig | No | Arbitrary attach configuration properties | |
| adapterConfig | No | Override adapter config inline | |
| exceptionBreakpoints | No | Exception filter IDs (e.g. ['uncaughtExceptions']) |