Questions tagged [debugging]

Debugging is the process of examining the state of a program - generally with a debugging tool - while it is running and attempting to find bugs that cause it to behave abnormally.

Questions on the following subjects about "debugging" are accepted:

  • The "debugging" phase itself
  • Debugging techniques/skills
  • How best to debug a given application, be precise in what seems to be the problem (distributed application, concurrent debugging, etc.)
  • When (not) to use a debugger in a given context ; again, be precise.

According to Wikipedia, there is a controversy on the origin of the "debugging" word:

The terms "bug" and "debugging" are both popularly attributed to Admiral Grace Hopper in the 1940s. However the term "bug" in the meaning of technical error dates back at least to 1878 and Thomas Edison and "debugging" seems to have been used as a term in aeronautics before entering the world of computers. Indeed, in an interview Grace Hopper remarked that she was not coining the term. The moth fit the already existing terminology, so it was saved.

We don't need any more questions on the origin of the term or definition of bug "types".

250 questions
282
votes
22 answers

Leaving intentional bugs in code for testers to find

We don't do this at our firm, but one of my friends says that his project manager asked every developer to add intentional bugs just before the product goes to QA. This is how it works: Just before the product goes to QA, the development team adds…
Krishnabhadra
  • 2,440
  • 2
  • 15
  • 14
169
votes
9 answers

I changed one method signature and now have over 25,000 errors. What now?

I started a new job recently where I am working on a very large application (15M loc). In my previous job we had a similarly large application but (for better or for worse) we used OSGi, which meant the application was broken down into lots of…
user788497
  • 1,321
  • 2
  • 9
  • 6
128
votes
16 answers

Is there any way to get faster at solving bugs? I've just had a warning from my boss

I've just been told by my boss that I will receive a negative performance review on Monday. He wants to talk to me about why I am so slow and why my bug fix rate is so low. I love programming and solving problems but I actually do find my job really…
user90636
105
votes
21 answers

What's the benefit of avoiding the use of a debugger?

Over the course of my career, I've noticed that some developers don't use debugging tools, but do spot checking on erroneous code to figure out what the problem is. While many times being able to quickly find errors in code without a debugger is a…
Jonathan DS
  • 460
  • 2
  • 6
  • 15
71
votes
17 answers

Is it reasonable to insist on reproducing every defect before diagnosing and fixing it?

I work for a software product company. We have large enterprise customers who implement our product and we provide support to them. For example, if there is a defect, we provide patches, etc. In other words, It is a fairly typical setup. Recently, a…
amphibient
  • 1,581
  • 2
  • 16
  • 24
65
votes
9 answers

How do you debug without an IDE?

Every time I look for an IDE (currently i'm tinkering with Go), I find a thread full of people recommending Vi, Emacs, Notepad++ etc. I've never done any development outside of an IDE; I guess I've been spoiled. How do you debug without an IDE? Are…
ConditionRacer
  • 5,682
  • 6
  • 38
  • 56
63
votes
5 answers

Why is reverse debugging rarely used?

gdb implemented support for reverse debugging in 2009 (with gdb 7.0). I never heard about it until 2012. Now I find it extremely useful for certain types of debugging problems. I wished that I heard of it before. Correct me if I'm wrong but my…
Philipp Claßen
  • 1,387
  • 1
  • 12
  • 26
58
votes
10 answers

How to test the tests?

We test our code to make it more correct (actually, less likely to be incorrect). However, the tests are also code -- they can also contain errors. And if your tests are buggy, they hardly make your code better. I can think of three possible types…
Ryszard Szopa
  • 1,810
  • 12
  • 11
58
votes
21 answers

"It was working yesterday, I swear!" What can you do?

When you arrive in the morning, you find that your software does not work anymore, even though it did when you left yesterday evening. What do you do? What do you check first? What do you do to stop being angry and start working on your problem? Do…
Nikko
  • 652
  • 6
  • 14
48
votes
17 answers

How to check or assess debugging skills of a person?

What kind of skills determine a person that is capable of debugging code with ease? Some time ago my friend carried out an interview with a relatively good programmer. The programmer got hired. He could write good code, understood the frameworks and…
Michal B.
  • 341
  • 1
  • 3
  • 9
45
votes
7 answers

Does software testing methodology rely on flawed data?

It’s a well-known fact in software engineering that the cost of fixing a bug increases exponentially the later in development that bug is discovered. This is supported by data published in Code Complete and adapted in numerous other…
Konrad Rudolph
  • 13,059
  • 4
  • 55
  • 75
42
votes
8 answers

Should debug code be left in place, always, or added only when debugging and removed when the bug has been found?

I, for one, only add debug code (such as print statements) when I'm trying to locate a bug. And once I've found it, I remove the debug code (and add a test case which specifically tests for that bug). I feel that it's cluttering the real code and…
gablin
  • 17,377
  • 22
  • 89
  • 138
39
votes
11 answers

Concurrency: How do you approach the design and debug the implementation?

I've been developing concurrent systems for several years now, and I have a pretty good grasp on the subject despite my lack of formal training (i.e. no degree). There's a few new languages that have become popular to at least talk about lately…
Berin Loritsch
  • 45,784
  • 7
  • 87
  • 160
38
votes
9 answers

Is possible to write too many asserts?

I am a big fan of writing assert checks in C++ code as a way to catch cases during development that cannot possibly happen but do happen because of logic bugs in my program. This is a good practice in general. However, I've noticed that some…
Alan Turing
  • 1,533
  • 1
  • 16
  • 20
35
votes
8 answers

How to most effectively debug code?

Bugs creeping into code can be minimized, but not entirely eliminated as it is written - programmers are, although many would disagree, only humans. When we do detect an error in our code, what can we do to weed it out? How should we approach it to…
gablin
  • 17,377
  • 22
  • 89
  • 138
1
2 3
16 17