Protocols
Saved & recent

DAP stack frames

Also called: stackTrace, scopes request, variablesReference

When a program pauses, a debugger can describe the active function calls as stack frames. In DAP, an editor requests stackTrace for a thread and receives frames with names, source positions and identifiers. Selecting a frame provides the context for inspecting that call’s local variables.

A paused checkout might have calculate above checkout above main. The editor uses the calculate frame ID in a scopes request, then uses a returned variablesReference to request the values inside its local scope. These handles describe the paused execution state; they are not permanent object identities. After execution resumes and stops again, the editor must obtain fresh state rather than reuse stale variable handles.

Read first
Debug Adapter Protocol
Related
Debug Adapter Protocol, DAP breakpoints, Correlation ID
Further reading
paused stack calculate 41 checkout 42 main 43 scopes(frameId 41) Locals variablesReference 90 variables(90) count = 3 resume paused handles expire
A frame ID selects a call; a separate variablesReference opens a scope’s values while execution remains paused.

View in the full Protocols collection