Capture Runtime Debug Snapshot
debug_snapshotCapture bounded raw evidence from the current stopped debug state—stack, locals, registers, exception details, modules, and nearby instructions—without resuming execution.
Instructions
Capture bounded evidence from the current stopped debug state without resuming execution. Use this when an agent needs raw stack, locals, registers, exception details, modules, or nearby instructions; prefer debug_diagnose_stop when you also want ranked crash hypotheses and project-frame selection. This is read-only with respect to the debuggee and returns best-effort evidence plus collection errors for optional data that an adapter cannot provide.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "debug_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| threadId | No | Stopped DAP thread to inspect; omit to use the session-selected stopped thread. | |
| sessionId | No | Optional DAP session ID. Omit to use the backward-compatible default session. | |
| moduleCount | No | Maximum loaded modules to return when includeModules is true. | |
| stackLevels | No | Maximum number of stack frames to include, from the selected thread top downward. | |
| includeModules | No | Include a bounded list of loaded executable images and libraries. | |
| disassembleAfter | No | Number of instructions after the current instruction to request when disassembly is enabled. | |
| disassembleBefore | No | Number of instructions before the current instruction to request when disassembly is enabled. | |
| includeDisassembly | No | Include best-effort instructions around the selected frame instruction pointer when supported. | |
| includeExceptionInfo | No | Include structured exception information for the stopped thread when the adapter supports it. | |
| maxVariablesPerScope | No | Maximum variables returned per inspected scope, bounding output size. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | Yes | ||
| stack | Yes | ||
| locals | Yes | ||
| scopes | Yes | ||
| thread | Yes | ||
| modules | No | ||
| stopped | No | ||
| exception | No | ||
| registers | Yes | ||
| postmortem | No | ||
| disassembly | No | ||
| symbolHealth | Yes | ||
| collectionErrors | No |