If you don't think the ability to set HW break points/watch conditions on
complex matches in order to stop the process possibly hours into a run
is not useful then I really do not know what to say. if you dont think
the ability to dynamically change run time parameters to force certain
trigger parameters is useful then I'm astonished.
The only thing I can guess is that you work on very small, well
structured code bases for which you are almost solely responsible for.
Nah, couple hundred thousand lines of code in the parts I work on
often, more in other parts, fairly complex realtime app. And you use
it I can say with moderate confidence (assuming you have a cell phone
with voice mail or call people with such, and don't blame me for the
UI, largely up to the phone companies).
That said, often our problems occur on customer sites with local
setups (e.g. very expensive switches) we don't have here. We can't
run under the debugger in their network on live systems. We need to
be able to do most of our debugging from logs and core files. And so
we try to make our log files very good...
And fair enough.
But some people here recommend against using them. There is a
difference.
I can't see recommending against what works for others. Mind you,
being too dependent on them wouldn't work well on our app, as
explained above.
Fair enough. Possibly. But I suspect your productivity would be much
better if you used one regularly. maybe. Maybe not. We'll not agree I'm
sure.
No. I would not.
I'd take them any day
"or the value of a variable or two". This is so open to interpretation
it is unbelievable. And as for the stack trace! What? There is NO
stack. Remember :-;
I disagree with them. Of course I respect them. I wonder how many
existing code bases they maintained and extended? I wonder how good
debuggers were back then? TBH, I'm sick of seeing that quote trotted
out. I know what a debugger can do. I use it to do it. There is NO WAY I
could find those bugs from a print out of a 2.5 Million line code
base. I suspect that the debuggers available then were a fraction of
what is available now.
Practice of Programming edition I had was 1999. Could be they've
changed their attitude since. Doubt it though, from what they wrote.
I would be interested to hear which bits of the following article you
disagree with:
http://dirac.org/linux/gdb/01-Introduction.php
Or is that guy wrong? Is Stallman wrong?
Um, that article was written by Peter J. Salzman? Where did Stallman
come into this? He is author of gdb, but ? I said it is a matter of
opinion. Anyway, Stallman is not a god (having seen him talk, IMHO he
is a bit of an odd duck. Anyway, there is no doubt he has written
some incredible apps). Neither are Kernighan and Pike. And their
quote starts "As a personal choice". What I was trying to show (and
think I said clearly) is not that it is bad practice/wrong/useless to
use a debugger. But that some experienced well regarded developers go
the other way and use it only sparingly.
It is IMO. Note the IMO. Maybe we have worked on different things. I can
only have my reasoned opinion. Developing code without using a good
debugger is, IMO, madness.
I guess that it is IMO makes it impossible to call you wrong, but can
you not see that "madness" is mighty strong? Developing with
relatively little use of the debugger works well for lots of people..
I do. And more importantly familiarisation.
How the heck do you familiarize yourself with 2.5 million lines of
code with a debugger? High level design documents would seem more
like it?
Valgrind is essential too.
I love Valgrind. I run our whole regression suite under valgrind,
really helps keep hard to find memory corruption errors from getting
to the field.
Emacs is falling behind the curve unfortunately. I use it too. I would
be interested to hear about your setup.
I gave up using ecb as it added no value. Semantic doesn't seem to do
much. Cscope and etags are ok. I never got code completion working
properly.
I use etags too. I mostly just use emacs for editing code (auto
indenting, keyword colorization, completion, etc), I don't use it as
an IDE (don't build from it, e.g.). We use clearmake and makefiles
for that... I like emacs clearcase integration as well.
-David