Debugging for Scala Control Flow DSLs
summary
A prototype instruments a Scala control‑flow DSL (reimplemented with the standard tail‑calls module) to emit source locations and captured locals, then serves them over an in‑process Debug Adapter Protocol link to the IDE. The demo reconstructs a deep, readable call stack and supports breakpoints and single‑stepping; implementation is ~380 lines of code and uses synchronized thread handoff and optional Eclipse libraries. It manually captures locals (e.g. n), handles runtime object rewrites, and successfully displays a reconstructed call stack in the IDE while raising questions about generality and native debugger multiplexing.
AI-written summary · about
chapters (10)
- 0:00Debugging control flow DSLs
- 3:09Indirect style DSLs debugging
- 4:16Live demo: call stack
- 7:09Debug info in DSLs
- 9:38Instrumenting DSL implementation
- 10:42Debug adapter protocol server
- 11:48Reconstructed call stacks
- 13:31Native debugging with DSLs
- 14:12Future work
- 15:15Q&A
related talks
50mBuilding a Debugger for Scala 3
39mA Dance with Tools
42mWhen your DSL Needs to Support User-Defined Functions
45mDesign and Effectiveness of Internal DSLs in Scala
41mReconstructing Scala
01h 03mInside the Scala Capture Checker
43mBoost Your Productivity with IntelliJ, Scala Plugin and More
41mHands On Capture Checking with Martin Odersky
