SapphireSteel Software

 

  -  
     
     
     
  -  
     
     
     
  -  
     
     
     
  -  
     
     
     
  -  
     
     
     
     

 

  rss
RSS (SITE)
 
  rss
RSS (BLOG ONLY)
 
   
 
 
     

 

Section :: Blog
- Format For Printing...

Ruby Debugger Enhancements - Conditional Breakpoints, Tracepoints and more

by Huw Collingbourne
Latest developments in the ultra-fast Cylon debugger
Wednesday 12 March 2008.
 

The ultra-fast Cylon Debugger is Ruby In Steel already has a huge range of debugging features. Even so, on the basis that you can never have too much of a good thing, we’ve added a number of new features to Cylon in Ruby In Steel 1.2.

Cylon 1.2 has all the features of Cylon 1 such as stepping and drill-down variables - plus many new features such as Tracepoints and conditional breakpoints

Cylon, our fast debugger is unique to Ruby In Steel Developer. It is not an open source product and it is not available with any other IDE. Its two most important features are its speed and accuracy. It offers debugging in plain Ruby or ‘embedded Ruby’ (Rails templates) with step into, step out, step over, drag-and-drop watch variables, drill-down variables (to look inside complex objects) in the Watch, Locals and Autos Windows, plus ‘hover and drill-down’ variable expansion and in the Code Editor and integrated Ruby Console. It provides call-stack navigation, a breakpoint window, a quick watch window and an immediate window to evaluate expressions while debugging. For an overview of these features see ‘Debugging Ruby With Cylon’.


Here is a quick overview of the new debugging features...

Change The Values Of Variables

When stopped at a breakpoint you may edit the values of variables in debug windows such as Watch and Locals. Just select a variable and click to put it into Edit mode...

You can even change the type of a variable in this way. Here I have selected the Fixnum, x, and I am assigning to it the Treasure object, t1...

Now, x has been assigned t1 and its class type is now Treasure rather than Fixnum...

Break On Exception

When an exception occurs, it may be more useful to be able to stop and debug it using the usual range of debug windows. Now you can...

Break On Hit Count

If you want to break only after a specific piece of code has been executed a certain number of times, add a Breakpoint Hit counter...

Conditional Breakpoints

If you only want to break when a condition (a test of one or more values) is met, create a Conditional Breakpoint...

Run Macro On Break

You can attach a macro to a Breakpoint - for example, you could write or record a macro to do anything from popping up a dialog box to inserting comments into your code - and this will run when the breakpoint is hit...

Tracepoints

There may be times when you want to be alerted that a piece of code has executed but you don’t want execution to break. You can do that by adding Tracepoints...

When tracepoints are met they will print messages without breaking (here I can see that my tracepoint has executed twice so I can tell that two Thing objects have been initialized)...


In addition to the new debugging features described above, Ruby In Steel 1.2 will also include a new fast JRuby Debugger (‘JCylon’) (see ‘JRuby Debugging In Visual Studio’). Most of these debugging features (with the exception of JCylon) are available in beta 2 of Ruby In Steel 1.2 which is available to registered users of Ruby In Steel Developer. The full suite of debugging tools will be provided in the final version of Ruby In Steel 1.2 which will be available within the next few weeks as a free upgrade to registered users.

AddThis Social Bookmark Button

Forum

  • Ruby Debugger Enhancements - Conditional Breakpoints, Tracepoints and more
    12 March 2008

    As I have said before, the excellent debugging features are what I like most about RiS! (And there is a lot of things in RiS that I like :) I would be lost without RiS when doing RoR development. The fact that I can put a breakpoint and step through code (even erb code) and inspect variable values makes me extremely productive.

    Thanks for all the hard work!

    Regards

    Willem

 

© 2008 SapphireSteel Software. All rights reserved