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.

learn more… | top users | synonyms (1)

123
votes
17answers
21k views

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 ...
14
votes
11answers
744 views

Is fixing bugs made by other people a good approach?

Let's assume the situation where a team of four developers is building an application. During the testing phase, bugs are reported by users. Who should fix them? The person who committed the erroneous ...
25
votes
10answers
2k views

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 ...
15
votes
4answers
854 views

How do I isolate difficult to reproduce bugs?

There's a bug in my program. Doesn't really matter what the platform is. Every so often, a row in a ListView is the wrong color. I tried setting a watchpoint for the variable that is supposed to ...
26
votes
8answers
7k views

How to most effectively debug code? [closed]

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 ...
89
votes
21answers
7k views

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 ...
18
votes
13answers
2k views

How to improve your ability to debug existing code [closed]

A common task in the working world is dealing with existing, but buggy code. What are some tips to improve your skills as a debugger?
14
votes
11answers
1k views

Is it significantly costlier to fix a bug at the end of the project?

In a blog post by Andrew Hay, the following axiom was posited: It costs significantly more to fix a bug at the end of the project that it does to fix the same bug earlier in the project. ...
12
votes
15answers
5k views

Real programmers use debuggers? [closed]

If experienced programmers actually ever use debuggers, and if so under what circumstances. Although in the answer to that question I said "months" ago I probably meant "years" - I really don't use a ...
7
votes
9answers
911 views

How to effectively do manual debugging? [closed]

Say you don't have a debugger available, what would be an effective approach to debug code which doesn't work (as expected)?
22
votes
10answers
922 views

Why do new programmers seem to ignore compiler error messages/runtime exception messages? [closed]

I think we’ve all seen this. Beginners ask questions on Stack Overflow that follow the basic outline... I’m trying to do (very vague description of the goal) but it doesn’t work/I get an ...
2
votes
5answers
2k views

How useful is “rubber duck debugging”? [duplicate]

I just learned about rubber duck debugging, where the programmer explains code, line by line, to a rubber duck or other inanimate object in order to find the problem. This approach sounds ...
40
votes
9answers
1k views

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 ...
32
votes
5answers
5k views

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 ...
18
votes
4answers
7k views

What is the correct way to handle debug output in Java?

As my current Java projects grow bigger and bigger, I feel a likewise growing need to insert debug output in several points of my code. To enable or disable this feature appropriately, depending on ...
17
votes
2answers
23k views

A good IDE for NodeJS - debugging especially important [closed]

Have a significant amount of a Data Warehousing application written in Javascript. The application is set up so that the Javascript code runs in a web browser (Chrome). Of course, running a Data ...
14
votes
8answers
1k views

What process do you normally use when attempting to debug a problem/issue/bug with your software? [closed]

Most people seem to treat debugging as an art, rather than a science. For those here which treat it as a science, rather than an art - what process(es) do you normally use when faced with a new ...
10
votes
8answers
3k views

How should one debug a PHP web application securely without exposing secrets to competitors?

Recently I made a program. I forget to delete 2 line of codes. That mistake cost me $800 per day every day. I was programming with PHP. If a visitor uses proxy it redirect somewhere else. Using ...
10
votes
7answers
273 views

What approaches can I take to lower the odds of introducing new bugs in a complex legacy app?

Where I work I often have to develop (and bug fix) in an old system (.NET 1) whos code is complete spaghetti - with little thought given to variable names, program structure nor comments. Because of ...
10
votes
2answers
5k views

How to debug/change Java code while the program is running?

I just saw a video showing how Notch (of Minecraft fame) is debugging and changing Minecraft while it is running. He pauses the game, changes something in the code and then unpauses the game where the ...
5
votes
8answers
478 views

Bug fixing approach

I have been working on a database project, and I recently received a bug report for the remote execution of some queries. Usually, you try to find out the actual cause for the bug to occur and then ...
9
votes
11answers
1k views

Turn away a bug if no reproducible test case exists? [duplicate]

If the customer has problems which are not reproducible because of complexity of actions they took and can't remember step by step, then coders are missing a test case. Indeed, this issue is ...
15
votes
1answer
705 views

Dollar Sign Blues: Javascript and PHP

I grew up programming C++ and Java where everything was safe and beautiful. Compilers made sure to keep me in check if I ever strayed. Of course, everyone did a little Perl in college, but I didn't ...
15
votes
9answers
706 views

How common are “bandage” fixes? [closed]

Imagine the following scenario: You've detected that your (or someone else's) program has a bug - a function produces the wrong result when given a particular input. You examine the code and can't ...
15
votes
7answers
678 views

Bug once in a while, but high priority

I am working on a CNC (computer numerical control) project which cuts shapes into metal with help of laser. Now my problem is once in a while (1-2 times in 20 odd days) the cutting goes wrong or not ...
6
votes
3answers
260 views

Multitasking how to keep track of what you're doing

I'm in a long debugging task, I need to figure out where to hook up some extra functionality I need. It's cumbersome work, and I've been debugging 2 whole days, and I'm on my third, but I work in ...
5
votes
3answers
298 views

Declaring variables in Python and PHP

The question is how to cope with absence of variable declaration in Python, PHP, and the like. In most languages there is a way to let the compiler know whether I introduce a new variable or refer to ...
0
votes
4answers
161 views

Naming: objectAction or actionObject?

The question, Stored procedure Naming conventions?, and Joel's excellent Making Wrong Code Look Wrong article come closest to addressing my question, but I'm looking for a more general set of criteria ...