From: Max Muermann Date: 2006-07-07T09:52:24+09:00 Subject: Re: debugging proposal A few points I'd like to make on the "do we or don't we need a debugger" debate. These are my personal opinions and not intended to upset anybody: 1. a debugger is very helpful in understanding other people's code (which includes frameworks like Rails). It can be valuable learning tool, in my opinion. 2. "I don't need a debugger" or "I have never really needed a debugger" are not valid reasons for not providing one. I don't use debuggers much, but it's nice to know there is one, if I need it. 3. I would really like to use Ruby for most of my professional software development. Unfortunately, IT managers are too often sold on tools, which creates the perception that the maturity of the tools is an indication of the value of the programming language. Now, while I wholeheartedly disagree with that, I cannot singlehandedly change this perception. If *I* was an IT manager in control of a project, that would be a different story, but I earn my livelihood by being a software consultant. 4. At the moment, my perception is that Ruby is mostly used by very clever and very experienced people (not including myself in that). When Ruby adoption becomes more widespread, especially in more commercial environments (so I can actually write Ruby code for a living), there will be inexperienced developers writing Ruby programs. My view is that the more experienced a developer is, the less reliance they will have on a debugger, but for all the others, a debugger is often a very valuable tool. 5. A debugger is *not* a replacement for unit testing! (Neither are unit tests a full replacement for a debugger, but they certainly do alleviate the need for one) 6. A fully-featured, performant UI-based debugger will help (me, at least) in evangelising Ruby. On two separate occasions, I have spoken to colleagues and got feedback along the lines of "Yeah, but I couldn't figure out why my program didn't work and it didn't have a proper debugger, so I went back to XYZ". 7. I needed something interesting to do and this seems like a decent way for me to understand the internals of Ruby. Cheers, Max > The times that I need a debugger for my ruby code match > exactly to the times my ruby code is far too complicated, > poorly factored, or poorly tested. > > Here's what debugging usually entails when I partake of it: > > 1) Code breaks > 2) mess around to find the breakage via the debugger > 3) Fix > 4) Goto 1 > > Sometimes step 2 will be the same every time because my fix > wasn't right, but sometimes it will be slightly different. > Having to repeatedly type the same (or similar) things into > the debugger is really, really annoying. > > Unless step 2 is automatic, unit testing will beat out using > a debugger. (And when it is automatic don't you have a test case > anyways?) With test cases I can be reasonably assured I'll > find a problem before I need to think about using the > debugger. With just a debugger I get neither automatic > protection nor repeatability. >