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

58
votes
21answers
5k 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 ...
46
votes
7answers
2k 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 ...
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 ...
37
votes
16answers
4k 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 ...
36
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 ...
30
votes
21answers
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!!
25
votes
13answers
1k 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 ...
24
votes
10answers
1k 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 ...
23
votes
3answers
1k 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 ...
22
votes
5answers
2k 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 ...
21
votes
15answers
2k views

Are debugging skills important to become a good programmer?

Along with the other qualities should a programmer need good debugging skills? If I have an applicant who was not able to find the error in the given program, but was able to solve all puzzles and ...
19
votes
5answers
1k 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 ...
19
votes
6answers
903 views

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

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.
18
votes
13answers
900 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
5answers
760 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 ...
17
votes
16answers
1k views

How to spend less time on debugging?

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 ...
17
votes
8answers
654 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). ...
16
votes
10answers
507 views

How common are “bandage” fixes?

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 ...
14
votes
6answers
984 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
761 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
852 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
10answers
492 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 ...
14
votes
7answers
636 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 ...
13
votes
5answers
368 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
8answers
518 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 ...
13
votes
7answers
492 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
6answers
649 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
1k 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 ...
11
votes
15answers
3k 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 ...
11
votes
4answers
408 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 ...
11
votes
2answers
7k 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 ...
10
votes
14answers
908 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 ...
10
votes
14answers
1k views

Can we guarantee a program will never go wrong?

We have a system here. Recently there is a wrong calculation in one of the number in the report generated by the system. Through out our experience, we've never encounter any problem/error in this ...
10
votes
8answers
639 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
237 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
329 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 ...
9
votes
10answers
506 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 ...
9
votes
3answers
305 views

Are there any theories or books about how to debug “in general”?

I read and studied a lot of computer science and engineering and I rarely or never seen a book about debugging or a theory how to debug (though I surely developed some debugging theories of my own). ...
8
votes
5answers
276 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 ...
8
votes
3answers
2k 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 ...
7
votes
9answers
538 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)?
7
votes
11answers
405 views

How to program something with the expectation that it will work the first time?

I had a friend in college who programmed something that worked the first time, that was pretty amazing. But as for me, I just fire up the debugger as soon as I finally get whatever I'm working on to ...
7
votes
5answers
286 views

How to understand and debug legacy software? [duplicate]

Possible Duplicate: I’ve inherited 200K lines of spaghetti code — what now? Not long ago my company placed me in a team that deals with some of the most complex bugs that are in production. ...
7
votes
3answers
337 views

Un-Explainable Bugs?

I've encountered bugs that are extremely difficult to reproduce reliably and/or explain definitively, but that appear to be solved. When this happens, how much time should I spend chasing it down? ...
6
votes
11answers
892 views

Turn away a bug if no reproducible test case exists?

If customer has problems which are not reproducible because of complexity of actions they took they can't remember step by step - coders are missing a test case. Indeed the issue is apperently ...
6
votes
7answers
386 views

What should I learn more about debugging?

To debug my programs I mainly use the following methods: Use printf (or equivalent in other languages) to check the value of a variable after a particular statement or to check whether the program ...
6
votes
7answers
990 views

Programming Interview : How to debug a program?

I was recently asked the following question in an interview : How do you debug a C++ program ? I started by explaining that programs may have syntax and semantic errors. Compiler reports the ...
6
votes
6answers
703 views

What's a good approach to adding debug code to your application when you want more info about what's going wrong?

When our application doesn't work the way we expect it to (e.g. throws exceptions etc.), I usually insert a lot of debug code at certain points in the application in order to get a better overview of ...

1 2 3