CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13
  1. #1
    Join Date
    May 2009
    Posts
    2

    What are the best debugging resources?

    Rather than reading all the search results in this forum for debugging, I'd rather just ask. My question includes tools & references?

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: What are the best debugging resources?

    Most IDEs come with a decent debugger.

    On Linux, there's gdb and valgrind. Valgrind is great for memory errors including leaks, and can be helpful in tracking down multithreading errors as well via the helgrind tool.

  3. #3
    Join Date
    Jan 2009
    Posts
    1,689

    Re: What are the best debugging resources?

    What language (GNU, Borland, Visual...) and what IDE (Code::Blocks, XCode, VS...)

    As Lindley said, most IDEs have a good debugger, XCode probably has the best one, but it's Mac-only of course.

  4. #4
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: What are the best debugging resources?

    XCode's debugger is just a gdb wrapper. And honestly I find Visual Studio's more intuitive to work with. (I say that as a Mac user.)

  5. #5
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: What are the best debugging resources?

    Besides a debugger, liberal use of assertions to document pre-conditions and assumed facts in general can be a good debugging aid.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  6. #6
    Join Date
    Jan 2009
    Posts
    1,689

    Re: What are the best debugging resources?

    Quote Originally Posted by Lindley View Post
    XCode's debugger is just a gdb wrapper. And honestly I find Visual Studio's more intuitive to work with. (I say that as a Mac user.)
    True, but it also comes with "Insruments" which can help you monitor everything for memory leaks to GPU load.

  7. #7
    Join Date
    May 2009
    Posts
    28

    Re: What are the best debugging resources?

    Quote Originally Posted by ninja9578 View Post
    True, but it also comes with "Insruments" which can help you monitor everything for memory leaks to GPU load.
    How do you monitor memory leaks? (this might help me find answer to a question I just posted)

    Thanks,
    sgiri

  8. #8
    Join Date
    Jul 2008
    Posts
    61

    Re: What are the best debugging resources?

    try book "advanced windows debugging" forerword and edited by Jeffrey Ritcher (author of windows via C/C++), also read kris kaspersky books about disassembling and debugging, Hacker's Debugging uncovered and ...

  9. #9
    Join Date
    Jan 2009
    Posts
    1,689

    Re: What are the best debugging resources?

    Quote Originally Posted by sgiri1981 View Post
    How do you monitor memory leaks? (this might help me find answer to a question I just posted)

    Thanks,
    sgiri
    Open the Instruments app, and navigate to the memory part of the tools library. There are three leak finder tools: Object Graph, ObjectAlloc, and Leaks, drag all of them onto the timeline, choose your app and press record.

  10. #10
    Join Date
    May 2009
    Posts
    28

    Re: What are the best debugging resources?

    Quote Originally Posted by ninja9578 View Post
    Open the Instruments app, and navigate to the memory part of the tools library. There are three leak finder tools: Object Graph, ObjectAlloc, and Leaks, drag all of them onto the timeline, choose your app and press record.
    Is that in Visual Studio? I dont see any such menu. (I use Visual Studio 6 (Enterprise)

    I somehow havent yet developed a liking for Visual Studio. I know its a de facto environment for c++ but I havent found it very friendly for editing/navigating. (I still havent figured out how to display line numbers)

    I come from Java background where I used Eclipse. oh boy! what a tool it is. I especially loved the numerous keyboard shortcuts (my favorite being ctrl+shift+p which would find the matching braces; it helps me in dealing with large functions with many loops/if-else)

    sgiri

  11. #11
    Join Date
    Aug 2007
    Posts
    858

    Re: What are the best debugging resources?

    (I use Visual Studio 6 (Enterprise)

    I somehow havent yet developed a liking for Visual Studio. I know its a de facto environment for c++ but I havent found it very friendly for editing/navigating. (I still havent figured out how to display line numbers)
    It would help if you used a modern version. VS6 is pretty horribly outdated, not to mention that it isn't standards compliant.

  12. #12
    Join Date
    Jan 2009
    Posts
    1,689

    Re: What are the best debugging resources?

    Quote Originally Posted by sgiri1981 View Post
    Is that in Visual Studio? I dont see any such menu. (I use Visual Studio 6 (Enterprise)

    I somehow havent yet developed a liking for Visual Studio. I know its a de facto environment for c++ but I havent found it very friendly for editing/navigating. (I still havent figured out how to display line numbers)

    I come from Java background where I used Eclipse. oh boy! what a tool it is. I especially loved the numerous keyboard shortcuts (my favorite being ctrl+shift+p which would find the matching braces; it helps me in dealing with large functions with many loops/if-else)

    sgiri
    Uh, no, that's XCode.

  13. #13
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: What are the best debugging resources?

    Quote Originally Posted by ninja9578 View Post
    Open the Instruments app, and navigate to the memory part of the tools library. There are three leak finder tools: Object Graph, ObjectAlloc, and Leaks, drag all of them onto the timeline, choose your app and press record.
    What is this feature ?

    How to use it in Visual studio 2008 ?

    Thanks.
    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured