In Giles Bowkett's "Debugger Support Considered Harmful",Giles makes the claim that "Ruby programmers shouldn't be using a debugger".
First, as a meta-comment to this, I truly love to see folks expressing such polarizing and radical opinions. Greatconversation starters, gets you thinking in someone else's viewpoint, devil's advocate, etc. At the very least, it's a change of pace fromthe REST vs everything else debate. :-)
Back to the issue at hand, debugging Ruby. I certainly understand where Giles is coming from, as I'vequestioned a few Rubyists about debugging, only to have them claim "I don't need a debugger" and "the command-line debugger is good enough". There is clearly a notion in the Ruby community, unlikeone I've seen almost anywhere else, that debuggers aren't important.
I twitteredthis morning, in reference to Giles' post, the following: "Seems like Stockholm syndrome to me". As in, if you don't have a decent debugger to use in the first place, itseems natural to be able to rationalize reasons why you don't need one. I have theexact same feelings for folks who spend almost all of their time programming Javamaking claims "the only way to do real programming is in an IDE"; because it's prettyclear to me, at this point, the only way to do Java programming is with an IDE.I've personally not needed an IDE to do programming in any other language, except of course Smalltalk, where it was unavoidable. Of course, extremely programmabletext editors like emacs, TextMate, and even olde XEDITkinda blur the line betweena text editor and an IDE.
My personal opinion: I love debuggers. If I'm stuck with a line-mode debugger, then fine,I'll make do, or write a source-level debugger myself(aside: you just haven't lived life if you haven't written a debugger).But I'll usually make use of a source-level debugger, if it's easy enough to use. Sometimes theyaren't.
Honestly, I love all manner of program-understanding tools. Doc-generators, profilers,tracers, test frameworks, code-generators, etc. They're tools for your programming kit-bag.I use 'em if I need 'em and I happen to have 'em. They're all 'crutches', because in a pinch, there's always printf() & friends. But why hop on one leg if I can actually make betterheadway, with a crutch, to the finish line of working code? Seems like a puritanical view tome to say "you shouldn't use crutches", and especially ironic for Ruby itself, which is a language fullof crutches!
Perhaps there is something about Ruby itself, which makes debugging bad. Or as Giles seems to be indicating, that testing frameworks can completely take the place of debugging. Some unique aspect of Ruby that sets it apart from other languages where debuggers are deemedacceptable and desirable. As a Ruby n00b, I'm not yet persuaded.
As for Ruby debuggers themselves, NetBeans 6.0 (beta)has a fairly nice source-level debugger that pretty much works out-of-the-box. Eclipse fanaticscan get Aptana or the dltk (Dynamic Languages Toolkit).I think it would be nice to have a stand-alone source-level Ruby debugger, outside the IDE, becausehonestly I think TextMate is a good enough IDE for Ruby anyway.
BTW, Rubyists, I'm getting tired of the Sapir-Whorf references.