Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
by Dennis Ushakov How does a Ruby debugger look and work on the inside? Is it difficult to write a debugger? Hear the full story of supporting Ruby 2.0 straight from the maintainer of the RubyMine debugger. In this session we'll expose debugger internals, including different APIs used by debuggers; review how they evolved; and look at what it takes to keep the performance of a debugged application at a reasonable level. We'll also talk about alternative implementations including JRuby and Rubinius.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the presentation titled "Ruby Debugger Internals" by Dennis Ushakov at RailsConf 2015, the speaker delves into the inner workings of Ruby debuggers, particularly highlighting the RubyMine debugger. The session provides insight into the complexities involved in developing a debugger for Ruby, including the challenges of maintaining performance and understanding critical concepts about tracking program execution. Key points discussed include: - **Understanding Debugger Fundamentals**: A debugger must answer two crucial questions: 'Where are we?' (determining the current position in the code) and 'What's going on?' (monitoring variable states and exceptions). - **Performance Considerations**: Speed is paramount, as developers prefer a debugger that does not significantly slow down their applications. The speaker emphasizes the importance of performance optimization while executing debugged applications. - **Event Tracking Mechanisms**: Several functions and methods are utilized for tracking code execution in Ruby: - **set_trace_func**: Introduced in Ruby 1.0, this function allows debuggers to listen for events within the Ruby VM and is a foundational tool for tracking. However, it is recognized for its slower performance. - **add_event_hook**: Introduced in Ruby 1.8.3, it allows for selective event monitoring, improving performance compared to set_trace_func. - **TracePoint**: A new API in Ruby 2.0 that wraps around add_event_hook and supports lazy evaluation of bindings, enhancing performance. - **DebugInspector**: A recent addition focusing on retrieving program state when hitting a breakpoint effectively. - **Execution Time Comparisons**: Through demonstration, Ushakov compares the execution times of various debugging methods, highlighting that while using the debugger, execution times can expand dramatically, revealing the cost of debugging APIs, particularly the binding evaluations. - **Real-World Applications**: Ushakov informs the audience about the types of debuggers that utilize different APIs, noting that set_trace_func is particularly slow and mainly used in Ruby's intrinsic debugger, while faster methods are employed in tools like Ruby Debug Base and the Debugger gem. - **Future Directions**: The presentation concludes with optimism regarding the potential for further optimizations in Ruby's debugging capabilities, particularly through lazy-loading functionalities. Ushakov encourages interaction via social media for those interested in further exploration of the materials covered. The talk provides a comprehensive overview of debugging in Ruby and underlines the ongoing developments aimed at enhancing efficiency without compromising functionality.
Suggest modifications
Cancel