in reply to Are debuggers good?
in thread How to debug unknown dynamic code?
So the question is, what do I use to debug?
Well, the first answer (and most important answer) is that I don't have to debug what doesn't contain bugs. Don't put bugs in. That's easier than it sounds, if you code in small chunks, slowly adding code one understandable step at a time. Never type anything into a program if you can't completely run it in your head.
The second part of the answer is that I started programming long before we had all these fancy GUIs and drag-n-drool debuggers. So when I had code go off the deep end, all I could do is keep adding print statements until it worked. As I got better, the number of prints got smaller, and then eventually I could just code the whole thing without adding any debugging.
With Perl, I throw in a random "die", sometimes with the result of Data::Dumper::Dumper in its mouth, but that's usually only once every five or ten times as I extend the program.
So what's all this about a Perl debugger? Why do people use it? Have they not learned the more effective ways of never letting your code get ahead of you, and trying to reduce the problem to something a die can show you? I'm truly puzzled.
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Are debuggers good?
by davorg (Chancellor) on Dec 28, 2000 at 18:14 UTC | |
by merlyn (Sage) on Dec 28, 2000 at 20:30 UTC | |
by davorg (Chancellor) on Dec 28, 2000 at 20:41 UTC | |
by agentv (Friar) on Dec 30, 2002 at 09:23 UTC | |
Re: Re: Are debuggers good?
by chipmunk (Parson) on Dec 28, 2000 at 09:06 UTC | |
(jeffa) Re: Re: Are debuggers good?
by jeffa (Bishop) on Dec 29, 2000 at 03:34 UTC | |
Re: Re: Are debuggers good?
by extremely (Priest) on Dec 28, 2000 at 10:07 UTC | |
by puck (Scribe) on Dec 28, 2000 at 10:37 UTC | |
Re^2: Are debuggers good?
by osunderdog (Deacon) on Jul 27, 2005 at 12:22 UTC |