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)

122
votes
17answers
20k 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 ...
88
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 ...
58
votes
21answers
6k views

“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 ...
53
votes
14answers
3k views

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 ...
50
votes
7answers
3k views

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 ...
41
votes
16answers
8k views

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 ...
39
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 ...
39
votes
8answers
2k views

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

How do you tackle really bizarre errors that keep you puzzled for more than 10 hours? [closed]

You know them, those errors that make NO sense. Where it seems like a gremlin just jumped deep inside your chips and messed up something. Do you take a walk, write stuff, call an uncle? I need help!!
28
votes
5answers
4k 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 ...
26
votes
13answers
2k views

Does the use of debuggers have an effect on the efficiency of programmers? [duplicate]

Possible Duplicate: Are debugging skills important to become a good programmer? I'm a young Java developer and I make a systematic use of the Netbeans debugger. In fact, I often develop my ...
25
votes
3answers
2k views

What is the term for a 'decoy' feature or intentional bug? [closed]

I have forgotten a slang programming term. This thing is an intentional bug or a decoy feature used as a distraction. An example usage, "Hey Bob, QA is doing a review today. Put a $THING into the ...
25
votes
8answers
5k 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 ...
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 ...
20
votes
5answers
2k views

How did they debug segmentation faults before protected memory?

Now, when I make a programming mistake with pointers in C, I get a nice segmentation fault, my program crashes and the debugger can even tell me where it went wrong. How did they do that in the time ...
20
votes
13answers
1k views

Becoming a Better Bug-Fixer

I love being a programmer. There, I said it. However, with that said, I've realized lately that I really can't stand bug-fixing. At all. In fact, while I'm developing something, my productivity is ...
20
votes
5answers
1k views

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 ...
19
votes
8answers
1k views

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). ...
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?
18
votes
4answers
5k 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 ...
16
votes
10answers
1k views
+200

Is it possible to speed- read code well?

Sometimes we have huge code listings to deal with, and I'm curious as to how the advanced, highly skilled programmers read code. And I'll say with an emphasis on debugging and finding issues.
16
votes
11answers
574 views

How to teach your users/customers to send better error descriptions

I often have to deal with customers or users which are reporting errors in applications. Most of the time their content is something useless as ERROR!!! x does not work without much more ...
16
votes
4answers
840 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 ...
16
votes
2answers
21k 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 ...
15
votes
16answers
2k views

How to spend less time on debugging? [closed]

Following the Pareto rule, a programmer spends only 20% of his time for really useful things. I spend 80% of my time debugging, fixing small things to get everything working. Is there a way to spend ...
15
votes
9answers
673 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
1answer
631 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 ...
14
votes
6answers
1k views

Why not use the word bug instead of exception?

If we refer to exceptions as bugs, why not just call it a bug in the first place instead of an exception? If in the code it's called exception and as soon as it occurs it's called a bug. Then why not ...
14
votes
5answers
934 views

Using A Debugger (An Interview Question)

During a phone interview I had, the interviewer was asking me questions about my previous job as a web developer. After discussing how I had used Eclipse to write Java Servlets, he asked me the ...
14
votes
11answers
724 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 ...
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. ...
14
votes
8answers
888 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 ...
14
votes
7answers
672 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 ...
14
votes
3answers
605 views

How to locate source code that implemented a certain feature?

I was wondering what are some techniques to locate which code implemented a specific feature, on a desktop application. I am a junior developer, with only professional programming experience lying ...
13
votes
5answers
399 views

Should I release source code to fix bug

I have a bug in my application that I'm building. I asked a question on S.O. and one of the users asked me to post or send all the code to him so he could look at it. I totally understand the ...
13
votes
7answers
520 views

Why don't schools cover debuggers?

After yet another homework question on SO. It seems like that vast majority of students have no idea what a debugger is or how to use one. I feel that knowing how to use a debugger is almost as ...
12
votes
15answers
4k 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 ...
12
votes
6answers
702 views

Debugging: understanding details on why certain fixes worked?

When debugging, I sometimes find that I make some changes and I am not 100% sure why those changes correct some bug in the program. Is it essential to understand every single detail about why some ...
12
votes
6answers
3k views

What do you look for when debugging deadlocks?

Recently I've been working on projects that heavily use threading. I think that I'm OK at designing them; use stateless design as much as possible, lock access to all resources that more than one ...
12
votes
3answers
496 views

Debugging memory corruption

First off, I do realize this is not a perfect q&a style question with an absolute answer, but I can't think of any wording to make it work better. I don't think there is an absolute solution to ...
11
votes
13answers
960 views

What is the biggest trouble developers encounter when debugging?

I just wonder what is the biggest trouble developers encounter when debugging? I can think of three answers but I am not sure whether they are correct: Trouble in locating the bug? But most of the ...
11
votes
5answers
806 views

Learning to investigate bugs [closed]

I'm not even sure how to define this difficulty. It reminds me of the test a couple of prospective employees did on me before I got a job. They would pick an object in the room and then I'd be allowed ...
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
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 ...
10
votes
9answers
2k views

What to do when you have exhausted all avenues to fix a bug

I am a Junior Programmer(4 months career experience so far) working on a Cross Platform Mobile Application (1 person team - so its just myself). I have a bug in this program/app which is pretty large ...
10
votes
7answers
269 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
5answers
323 views

Tips for debugging with very little info? [closed]

I've inherited a project with a fairly large codebase, and the original developer rarely, if ever, replies to emails. There's a ton of different ways to do some things in it, and I don't know all of ...
10
votes
5answers
386 views

Invert how to teach programming?

I was thinking about the responses to my thread on programming Program like a writer..? and most people agreed that you should have some structure and build from there instead of just typing away. New ...
10
votes
1answer
18k views

How can I debug a JSP?

I'm trying to edit a JSP for a project and I'm getting a NullPointerException somewhere in the JSP when it's requested from my server. My web server (JBoss) is reporting the exception, but it's ...
10
votes
2answers
4k 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 ...