Skip to main content

Module debug_session

Module debug_session 

Source
Expand description

W11 — DebugSession: the one seam the DAP adapter and the Studio drawer both sit on.

A thin DAP-vocabulary facade over the bytecode Debugger, so the two consumers can never disagree about the paused program: threads, stackTrace, scopes/variables, the stepping verbs (including the headline stepBack/reverseContinue time-travel), and evaluate — routed through the Wave-10 frame_eval, the tree-walker oracle, so a watch expression means exactly what the same expression means in a program.

The stdio DAP server (largo dap) is a serializer over this facade; the Studio debug drawer is a renderer over it. session_parity_lock proves both observe the identical state the underlying Debugger reports — the facade is a lens, never a second source of truth.

Structs§

DapFrame
A DAP stack frame, innermost-first (DAP orders the current frame at index 0; the debugger snapshot lists Main first, current last, so the facade reverses). line carries the time-travel step — the honest bytecode-tier analogue of a source line, and what makes the scrubber and the editor gutter agree.
DapThread
A DAP thread. Single-task debugging (real tasks arrive with Wave 12’s concurrency debugger) ⇒ exactly one main thread.
DapVariable
A DAP variable in a frame’s Locals scope.
DebugSession
A debug session: owns a Debugger and answers DAP-shaped queries against it.