One of the problems with “traditional” Ruby is the (notoriously) slow debugger. The Ruby In Steel Cylon debugger isn’t just the fastest Ruby debugger available it’s also the most functional, with several new features that I’ve just added.
When we first started out on building RiS, one of our main objectives was to have a fast debugger. Not only that, but to have the fastest debugger around. We’ve achieved this by using a combination of assembly language programming, careful optimization – and one or two other sneaky tricks (learnt from years of programming fast real-time systems) that I won’t go into here.
There are two other debuggers with which Cylon can be compared – the original ‘slow’ Ruby debugger and a faster one written in C – ‘ruby-debug’. There are two fundamental benchmarks that can be used to compare the intrinsic performance of various debuggers: a ‘line’ based benchmark and a ‘call’ based one. These are the basic figures (in seconds):
| no debug | Cylon | ruby-debug | slow debug |
| Line | 8.5 | 10.7 | 19.9 | 1750 |
| Call | 4.6 | 18.7 | 31.4 | 1210 |
As you can see, Cylon is about twice as fast as ruby-debug in the line based benchmark and about 70% faster in the call based one. I’ll explain how the benchmarks were done and give some more details on use of breakpoints, etc. next week, but the bottom line is for all benchmarks Cylon is between 50% and 100% faster (approximately) than ruby-debug. Compared to the slow debugger, Cylon is typically between 100 and 150 times faster than the slow debugger.
I’ll just briefly list the main new features we’ve put into Cylon:
In addition to displaying Ruby data, you can set and modify Ruby variables and data in a watch window.
Conditional breakpoints are now implemented, i.e. a breakpoint will only become active if a Ruby expression is true or alternatively a data value has changed.
Breakpoint counts now work, so you can fire a breakpoint after say 4 passes.
Visual Studio Tracepoints now work.
Restarting the debugger from the Visual Studio IDE now works.
Break All is implemented. This is if you select Break All, the debugger will fire.
Just in Time exception handling works: if an exception occurs, the debugger will fire instead of passing the exception to the handler.
Over the next couple of weeks, I’ll describe these new features (and a couple more) in more detail.
Note:
these features are only available in Cylon/RiS 1.2 (to be released shortly).
Cylon is only available in the Developer Edition.