Thread: Do you use a debugger?

  1. #16
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I use a debugger. All the time, even though I have "sound grasp" of C++.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #17
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Location
    CA, USA
    Posts
    466
    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).

  3. #18
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >Do you use a debugger?
    No.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    And why not?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #20
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >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.

  6. #21
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by Prelude View Post
    >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.
    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.

  7. #22
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by esbo View Post
    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.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #23
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    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.

  9. #24
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Oho! You should try me.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #25
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    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.

    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.

  11. #26
    Beautiful to C Aia's Avatar
    Join Date
    Jun 2007
    Posts
    124
    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

  12. #27
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Quote Originally Posted by swoopy View Post
    >Do you use a debugger?
    No.
    Quote Originally Posted by Elysia View Post
    And why not?

    Easy, he doesn't write bugs.

  13. #28
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    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?!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #29
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    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.

  15. #30
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Ah, I see. My bad. I failed to see esbo's superiorness.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting a C# program with a manifest file to run in the debugger
    By Xarzu Athanasop in forum C# Programming
    Replies: 0
    Last Post: 01-18-2008, 06:34 PM
  2. executing from debugger
    By hedwin in forum C++ Programming
    Replies: 8
    Last Post: 10-11-2007, 04:05 PM
  3. Replies: 3
    Last Post: 07-24-2007, 04:25 PM
  4. MSVC++ Debugger (it kills me)
    By lightatdawn in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 06-29-2002, 07:37 PM