Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8477411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:27:41+00:00 2026-06-10T18:27:41+00:00

I am interested in devoting a good amount of time to improving my debugging

  • 0

I am interested in devoting a good amount of time to improving my debugging ability and am looking for a list of core topics that I need to cover in order to be versed in the principles of commonly used and advanced debugging/testing techniques.

Initially, I figured I would just read through the gdb documentation and glean debugging techniques from its functionality; however, other than jumping into it to get the line number of a segfault and maybe running bt, months later I am still resorting to mass printf‘s as my default strategy. I feel this is because I don’t have any well defined strategies that I could effect through more sophisticated means.

Although my question is in relation to C/C++, and although I operate within a UNIX environment, I would be willing to look at generalized material, or even topics covered in other languages if they will improve my understanding of key concepts.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:27:43+00:00Added an answer on June 10, 2026 at 6:27 pm

    You have multiple direct strategies which you should consider:

    • Mass printfs cry for a logging solution. You have many options here, but logging extensively isn’t particularly a bad strategy, it is in fact vital for any form of client-side debugging.
    • Extensively use assertions (and never disable them, even in “release” code). Always write checks for all potential errors and fail as soon as possible (use exceptions in C++ — always throw, never catch).
    • Learning to master gdb within emacs is useful. Learning how to step the program, how to set up breakpoints and how to inspect local variables is usually more than enough.
    • Unit testing is something to consider too. Especially since small tests are easier to debug, because they are not surrounded by the noise of a fully featured program. Write tests before the code, or better, have someone else write the tests.

    More generally, the following points, although not directly related to debugging, will benefit you:

    • Learning how a program is executed (learn eg. about stack frames and a small intro to assembly) may prove useful in certain situations where a bug is corrupting memory. More generally, never stop learning stuff about your environment.
    • In C++, use good practices: RAII, the standard library, failing as soon as possible, etc. This has a strong tendency to reduce debugging effort, esp. since debuggers can pretty print stuff from the standard library. Also, coding a simply as possible has a positive effect on debugging time.
    • Use (distributed) version control. Always. You’ll see the benefits once you’ll get accustomed to it (eg. in combination with unit tests, you have the almighty git bisect available to you).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am interested in logging all traffic that comes over port 443 for trouble-shooting
Just interested in knowing if there are any good (and short! :-) ) articles
Interested in people's opinion. You have an application server running 3/4 services that do
im interested i just finished writing a program and one of the functions that
I am interested in creating URL with ASP.Net MVC 3 that has a QuerySting
Interested in description of your most used ASP.NET httpmodules that solved a specific problem
I am interested in reducing the time between refresh of SNAPSHOT versions of dependencies
I am interested in developing something that will make use of Chinese handwritten recognition
Im interested in a way one service activate users. The scenario is that I
I'm interested in implementing a 'user data' backup facility for the core data sqlite

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.