get_stack_trace
Retrieves the current stack trace for a paused debugging session, filtering internal frames by default and reporting why execution stopped.
Instructions
Get stack trace. The response includes stopReason — why the session is paused. For an implicit frameless stopped thread, a sibling with policy-recognized user frames is preferred and adopted, with the switch disclosed in note. Internal/runtime frames are filtered by default; when any are hidden the response carries hiddenFrames and a note. When the frame the program is paused in is itself internal, pausedFrame names it (kept: whether it was retained as stackFrames[0]) and the note says so. The note also says when the top frame's file is newer than the compiled file the debugger binds it through (a stale build)
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": {
"sessionId": "<sessionId>"
},
"name": "get_stack_trace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| threadId | No | Inspect this exact thread (ids from list_threads). Explicit selection is authoritative and is never silently switched | |
| sessionId | Yes | ||
| includeInternals | No | Include internal/framework frames (e.g., Node.js internals, node_modules dependencies, async separators). Default: false for cleaner output. |