Summary
First release with a functional Debug Adapter Protocol layer. The DAP debugger was structurally complete but had three gaps that prevented it from actually working — all three are now closed.
Fixed
-
Stack frames report real source lines — Previously hardcoded to
0, so clicking a frame in the debugger did nothing. A newcode-location-to-linehelper usessb-di:code-location-toplevel-form-offsetanddebug-source-start-positionsto map code locations to 1-based line numbers by counting newlines in the source file. -
Line and function breakpoints now halt execution — Breakpoints were stored but never checked. They are now installed via
sb-int:encapsulateon the function enclosing the requested line (resolved through the source index). The wrapper callsdap-stopwith:breakpointreason when the debugger is active.setBreakpointsandsetFunctionBreakpointssync encapsulations live;install-pending-breakpointshandles breakpoints set before launch/attach. The stopped callback now dispatches on reason (:breakpoint,:step,:entry,:exception) and sends the correct DAPstoppedevent. -
stackTrace respects pagination —
handle-dap-stack-tracenow readsstartFrameandlevelsfrom the request and slices the frame list accordingly.totalFramesreports the full frame count per the DAP spec.
Changed
- Bumped version to
0.2.0.
Test plan
- Build succeeds (
make) - DAP client connects on port 6009
- Set a line breakpoint in a loaded file, run code, verify execution halts with
reason: breakpoint - Click a stack frame in the debugger UI, verify it jumps to the correct source line
- Set a function breakpoint by name, verify it halts on call
- Request
stackTracewithstartFrame/levels, verify pagination works - Trigger an error, verify
reason: exceptionand restarts appear in the debug console