Ruby Debugger Internals
summary
Explains how RubyMine debugger supports Ruby 2.0 by actually using and comparing APIs: set_trace_func (eager binding, slows a simple 5s loop to ~2 minutes), the C-level rb_add_event_hook (10.5s when empty), TracePoint (about 30s unless binding is requested), and debug_inspector for lazy frame capture. Shows benchmarks, counts many VM events per call, and contrasts with Rubinius’ compile-time breakpoint placement that makes breakpoints fast and predictable.
AI-written summary · about
chapters (17)
- 0:00Intro
- 1:12Two questions
- 2:48Speed
- 3:05Measurement
- 3:43Sample Program
- 4:56Event Types
- 6:30Binding
- 6:54Sample Output
- 8:42Ruby 1.8.3: rb_add_event_hook
- 9:42event_hook gem
- 10:43Ruby 2.0: TracePoint
- 12:04Ruby 2.0: debug_inspector
- 12:55debug_inspector gem
- 14:02Performance summary
- 16:21Under the hood
- 16:53Being lazy, pt 2
- 18:50Rubinius: performance








