Do I wish I had a great IDE with fantastic debugging support? Of course I do, and I'd also like refactoring support while we are daydreaming. Until that day comes, I'll continue to look for other ways to be effective.
To mitigate the debugging issue the Ruby developers I work with end up relying very heavily on their tests; therefore, debugging becomes less of an issue. Unfortunately, even the best testers can't always isolate complicated issues. In these circumstances the best Ruby developers are often forced to use the age old debugging strategy of printing values. I was recently in one of these situations and I used the following statement in lieu of the typical
p
statement.loop do
p eval(gets)
end
I do miss mature tools and infrastructure. However, the ease in which I can create adequate solutions in Ruby makes it hard to consider doing anything else, currently.
What about a more powerful debugging method?
ReplyDeleteWith puts you cannot get debugging on rails, as exmaple..
Ruby-debug is your friend :-)
RubyForge ruby-debug project page
http://activestate.com/Products/komodo_ide/fix.plex
ReplyDeletesolid debugging for ruby - including rais support.
Try the netbeans version 6.0 beta.
ReplyDeleteIt has great debugging and some refactoring support.
Just a quick +1 for ruby-debug. I had never stepped through ruby code before, and found myself venturing down the rabbit hole that is a full rails request just by using 'debugger' in a controller and continually hitting 'n' + return.
ReplyDeleteGood times and something I think more rails developers should play around with.
I'm not sure I understand: RDT for Eclipse (now part of Aptana) and DLTK Ruby (for Eclipse, base of CodeGears' 3rd Rail IDE) support debugging - RDT has done so for many years (as a matter of fact, the Netbeans debugging support is based on the code from RDT) and also does ruby-debug debugging.
ReplyDelete