Skip to main content

Module debugger

Module debugger 

Source
Expand description

Interactive debugger for stryke programs.

Provides breakpoint-based debugging with single-stepping, variable inspection, and call stack display. Two front-ends share this state machine:

  • TTY/CLI (default, via -d) — prompt() reads commands from stdin and writes to stderr. Same UX as perl -d.
  • DAP (via --dap) — prompt() instead routes through crate::dap::DapShared, emitting stopped events and condvar-waiting for resume. Stdin is owned by the DAP reader thread; the debugger never touches it in DAP mode.

The split is per-instance, not compile-time: Debugger::set_dap_backend configures the DAP backend. With no backend set, TTY behavior runs.

Structs§

DapBackendHandle
Opaque handle into crate::dap::DapShared + the shared breakpoint state. Kept as Arc<dyn Any> so debugger.rs does not depend on dap.rs at compile time (and tests work without DAP).
Debugger
Debugger state, shared between VM and interpreter.

Enums§

DebugAction
Action to take after debugger prompt.