Skip to content

Debugger#1410

Open
LadyCailin wants to merge 5 commits intoiterativeInterpreterfrom
debugger
Open

Debugger#1410
LadyCailin wants to merge 5 commits intoiterativeInterpreterfrom
debugger

Conversation

@LadyCailin
Copy link
Member

@LadyCailin LadyCailin commented Mar 13, 2026

This PR implements a DAP server, to support debugging via the VS Code plugin.

This adds on a debugger to the evaluation loop, that allows for pausing,
saving state, then resuming from saved state.
…ebug support

   - Add MSDebugServer implementing the Debug Adapter Protocol over TCP,
     with launch/attach modes, breakpoints, step-over/step-in/step-out,
     variable inspection, exception breakpoints, and watch expressions
   - Add multi-thread DAP support: register/unregister threads, per-thread
     pause states, sync and async stepping modes (sync blocks in place,
     async snapshots state and resumes on a new thread)
   - Refactor DebugContext into a full thread-aware debug state manager with
     per-thread StepMode, ThreadDebugState, and a thread registry for DAP
   - Add DaemonManager lifecycle listeners and thread-aware waitForThreads,
     so the debug session stays alive while background threads run
   - Extract spawnExecutionThread() to centralize execution thread lifecycle
     (run, await daemons, signal completion) in one place
   - Fix StackTraceManager thread affinity: remove isDebugAdopted flag so
     background threads (x_new_thread) get their own STM instead of sharing
     the main thread's, which was corrupting call depth for step-over
   - Fix skippingResume flag: clear unconditionally on source line change
     rather than requiring shouldStop=true, which blocked step-over returns
   - Add StackTraceFrame.getTarget() for debugger source mapping
   - Add Breakpoint condition/hitCount/logMessage support
   - Wire up cmdline interpreter (--debug flag) and lang server for DAP
   - Add DAPTestHarness and dual sync/async integration tests for step-over
     and multi-thread step-over scenarios
   - Add debugger dependency (lsp4j.debug) to pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant