I use a debugger. All the time, even though I have "sound grasp" of C++.
debuggers are vital, especially when locating the source of a crash. But there is a lot to be said for putting simple variable outputs throughout your code as well. gdb is a very good, easy to use debugger (my fav).
>Do you use a debugger?
No.
>I find I do not need to use one at all
More power to you, but if you've ever been responsible for correcting an intermittent and difficult to find bug, where the bug was a show stopper and costing someone lots of money for every hour of downtime, you'd understand that the more tools you have, the better off you are.
>I find any mistakes I make are usually typing errors etc
>or simply common oversights which I can fix immediately.
Those kinds of bugs are trivial to find and fix anyway. The hard ones that are simplified by a debugger are logic based (where you need to analyze the runtime data), memory based (where you need to analyze runtime memory addressing), and concurrency based (where you need to analyze the execution flow). These bugs aren't easy to find and correct simply by eyeballing code, regardless of how experienced you think you are.
Do I use a debugger? Yes. I use a debugger for more than just debugging too. It's a valuable tool for testing and quality control.
My best code is written with the delete key.
Well it depends whether you are debugging yours or someone elses code, if I am writing code I tend to only add a certain ammount of code at a time so it there is a fault it is pretty easy to spot and as I am used to the code I know which bits work and are well tested and which bits might not.
Testing is the hardest part though, I have spent many an hour trying to debug my code, to the point of exasperation only to find the code actually worked but that my 'test' was wrong . It was doing precisely what it should have done but I had not been through enough in determining what results the test data should have produced.
Also as runfile produced in debug mode is different from the one in normal mode some bugs can 'disappear' in debug mode because an area of memory accidently overwritten can shift
from a harmful one to a harmless one. I work on the basis that a bug is easier to put in than take out so it there is anything I am unsure about I test it seperately before introducing it into my main code.
Maybe I will try and see if I can use the debugger for gcc but I doubt I will ever need it.
I'm sure you won't, seeing as how bug-riddled and unsafe your code is and how small projects you write and leave the headaches and debugging to other people.
Perhaps you should try writing bigger, complexer projects and see if you need the debugger or not. A debugger can solve hours of headaches simply because you made a slight programming error that is hard to see or analyze directly. But the debugger would catch it insanely easy.
Not to mention it's a great tool for actually analyzing that your code does want it should do and nothing else. Nothing... bad, perhaps such as doing undefined behavior, which you would know nothing about since you never use debuggers or write good practice code without any undefined behavior anywhere.
Elysia, the current project I am working on is so big and complex that I doubt you would
be able to understand it or even get it to compile.
Try a half-million to a million or so lines of code. Then come back and say you don't use a debugger. If you don't I'm sure you are wasting valuable time. Only a fool refuses to use the tools that are at his/her disposal.Elysia, the current project I am working on is so big and complex that I doubt you would
be able to understand it or even get it to compile.
Your question is very similar to this:
Do you use the accelerator in your car?
No I prefer to push my car all the way to work.
Last edited by VirtualAce; 03-05-2008 at 06:00 PM.
Don't I smell a lot of ego.
Little Jimmy: My father is a pilot and makes a lot more money than yours.
Little Tom: My father is a policeman and can put your father in jail.
Jimmy: Naw-ugh! My father will get into his plane and you father can not catch him.
Tom: Yes, sir-ree!. My father can shoot the plane down with his gun and ...
When the eagles are silent, the parrots begin to jabber. ~Winston Churchill
I'm sure, but I usually do tend to hear the opinions of the accused since they can give the most accurate answer from their point of view as to why a debugger is so horrible and irrelevant.
I think the question of the thread is not "do you use a debugger," but instead becomes "do you not use a debugger"?
And while we're at it, why not make the thread into a poll, so we can how many who do not use a debugger!? Wouldn't that be awesome?!
No, Elysia, you fail to understand that esbo simply started this thread as a dick-waving contest. All the people who don't use debuggers win. Everyone else loses. Polling really doesn't fascilitate this because he's not gauging anyone's opinion.