A stop-the-world debugger for Erlang (and the BEAM)
summary
edb extends OTP with a new debugging API and a compiler flag that emits beam debug info so the VM can install per-line trampolines (run-time jumps) and create stack frames on the fly; a debugger node injects support modules over distribution and suspends nearly all user processes while preserving timers to give an illusion of a stopped VM. Stepping is simulated by conditional breakpoints; running two and a half days of real WhatsApp tests shows overhead is acceptable. Available on GitHub and integrated into VS Code via the Erlang Language Platform.
AI-written summary · about
chapters (15)
- 0:00Debugging challenges in Erlang
- 3:38Traditional debugger limits
- 5:30Stop-the-world debugger design
- 7:39Debugger system architecture
- 9:45VM changes for breakpoints
- 13:27Debugger primitives
- 14:33Suspending processes
- 16:41Timers during suspension
- 18:26Inspecting variables
- 20:18Stepping without VM changes
- 24:37Debugging performance impact
- 26:50Testing and adoption
- 27:10Debugger shortcuts
- 31:44Future improvements
- 32:06Debugger availability
