the blog
Back to -Blog

New Debugger Features

by Dermot Hogan
Thursday 21 February 2008.

In the upcoming 1.2 release, I’ve added some new features to the debugger (as well as speeding things up a fair bit as I blogged about previously).

The first (and most useful) new feature is the ability to set the value of a Ruby object from a Visual Studio Watch window. So if you have a variable r whose current value is 3 (say), you can just overtype the 3 with 4 and r will now be 4. In fact, you can use any valid Ruby expression, since the IDE just sends the statement (in this case) r = 4 to the Ruby interpreter which executes it.

If you look in the Breakpoints Window in Visual Studio, you’ll see options like Hit Count and Condition. In the current release (1.1.5) of Ruby In Steel, if you select these and try of do something, nothing happens. In 1.2, conditional breakpoints – breaking when a Ruby expression becomes true say - and breakpoint counts – firing after a given number of hits - are now implemented. Personally, I’ve rarely (if ever) used these – for some reason, they just don’t seem to mesh with the way I debug. But, your mileage may vary ...

There’s one very useful feature which I’ve also implemented – Tracepoints. A ‘tracepoint’ is sort of like a real breakpoint, but instead of breaking and halting program execution for you to step or whatever, a tracepoint will print out some text into Visual Studio’s Output Window. I have extensive tracing built into RiS and while I don’t use it often, when I do need to use it, it is essential. Especially with an event-driven system like Visual Studio. So I think Ruby tracepoints should prove to be pretty handy.

I’ve also improved the general usability of the debugger. The Restart menu item now does what it says as does Break All. If you hit Break All, the debugger will fire if Ruby is executing – that is not in an I/O (or other) wait. This is highly useful if your code gets stuck in a loop. If your Ruby code is in an I/O wait, the debugger will fire when the interpreter becomes runable again

Lastly, exception handling is much improved. If an exception occurs, the debugger will fire instead of passing the exception to the handler. This is configurable on a project basis.

The beta of Ruby In Steel 1.2 will be available to registered users of RiS Developer in a few days.

Bookmark and Share   Keywords:  debugger  development
© SapphireSteel Software 2014