debug.gem: Ruby's new debug functionality
summary
A new debugger gem is built from scratch and already released as a gem and slated to ship with Ruby 3.1; it targets Ruby 2.6+ and uses TracePoint internals to avoid the usual slowdowns, claiming negligible runtime penalty where older debuggers slowed workloads up to 300× in a benchmark. Features include remote and VSCode (DAP) integration via TCP or Unix sockets, postmortem entry, thread/Ractor awareness, and a record-and-replay step‑back recorder; demos show breakpoints, stepping, variable inspection, and successful IDE and Chrome frontends.
AI-written summary · about
chapters (21)
- 0:00Intro
- 1:26About Koichi Sasada
- 1:57What is a debugger?
- 3:26Ruby's existing debuggers
- 4:03Why create yet another debugger?
- 6:53debug.gem
- 8:50Demo: Basic usage
- 11:10Basic features • Control the program execution
- 12:48Control debugger from the program by binding.break do: expr
- 13:41Step execution Step-in, Step-over, Step-out
- 14:38Access to the local variables in the specific frame See the backtrace with backtrace Select the frame
- 15:25Advanced features
- 15:43Demo: Remote debugging Connect over network • Easy to open remote debug port and attach • Run program with opening debug port
- 17:20Demo: Seamless integration with VSCode/Chrome browser
- 18:41Demo: Start VSCode for debugger frontend
- 19:05Demo: Postmortem debugging Debug dead Ruby process
- 19:44Demo: Record and replay debugging Backward stepping execution
- 21:01Performance
- 21:50Acknowledgements
- 22:30Conclusion
- 23:05Thank you for your listening!








