Skip to main content

Module dap

Module dap 

Source
Expand description

Debug Adapter Protocol (DAP) client — launch, breakpoints, step, stack/vars.

Talks DAP with Content-Length framing over stdio (same transport as LSP). Auto-picks a local adapter when available:

  • Python → python -m debugpy.adapter / debugpy-adapter
  • Go → dlv dap
  • Rust / C / C++ → lldb-dap / codelldb / lldb-vscode
  • Node → js-debug-adapter (if present)

Sequence (matches VS Code): initialize → response → launch → adapter emits initializedsetBreakpoints*setExceptionBreakpointsconfigurationDone → launch response. Adapters that never emit initialized get the configuration after a 2s fallback in poll().

UI surface lives in the TUI (Mode::Debug); this module is headless-safe.

Structs§

Breakpoint
DapClient
LaunchConfig
Minimal VS Code-compatible launch configuration.
StackFrameInfo
VarNode
One row of the Variables tree (scopes are depth-0 roots).

Enums§

DapState
DebugPane

Constants§

DAP_PANEL_ANIM_MS
Panel slide-up duration.

Functions§

load_launch_configs
Walk up from hint looking for .vscode/launch.json and parse configurations.