Skip to main content

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.

Filter by
Sorted by
Tagged with
283 votes
22 answers
53k views

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 ...
Krishnabhadra's user avatar
169 votes
9 answers
30k views

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 ...
user788497's user avatar
  • 1,321
127 votes
16 answers
28k views

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

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 ...
71 votes
17 answers
10k views

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 ...
amphibient's user avatar
  • 1,591
65 votes
5 answers
21k views

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 ...
Philipp Claßen's user avatar
64 votes
9 answers
12k views

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 ...
ConditionRacer's user avatar
58 votes
12 answers
7k views

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 ...
Ryszard Szopa's user avatar
57 votes
21 answers
11k views

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 ...
49 votes
17 answers
52k views

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

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 ...
Konrad Rudolph's user avatar
41 votes
8 answers
10k views

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). ...
gablin's user avatar
  • 17.6k
38 votes
11 answers
9k views

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 ...
Berin Loritsch's user avatar
37 votes
9 answers
8k views

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 ...
Alan Turing's user avatar
  • 1,533
35 votes
8 answers
36k views

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 ...
gablin's user avatar
  • 17.6k
34 votes
4 answers
72k views

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 ...
sc4r137's user avatar
  • 1,463
33 votes
4 answers
7k views

I am developing code mainly using Bash, C, Python and Fortran and recently also HTML/CSS+JavaScript. My OS is Ubuntu. Maybe I am exaggerating, but I figured that I kind of spend more time getting ...
Max H. Balsmeier's user avatar
31 votes
3 answers
10k views

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 ...
Freiheit's user avatar
  • 1,050
30 votes
20 answers
3k views

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?
29 votes
13 answers
8k views

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?
GSto's user avatar
  • 8,541
27 votes
8 answers
6k views

I have had a discussion with a coworker about breaking a return statement and the statement that calculates the return value in two lines. For example private string GetFormattedValue() { var ...
Paul Kertscher's user avatar
27 votes
2 answers
81k views

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 ...
ampersandre's user avatar
26 votes
13 answers
2k views

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 ...
alain.janinm's user avatar
26 votes
7 answers
3k views

I have been a programmer for almost 1 year. As an ADHD adult, naturally I don't have the same strength of attention on ordinary stuffs as my colleagues do. And I find the catastrophe made by me are ...
ZengJuchen's user avatar
  • 1,693
26 votes
10 answers
2k views

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 error/...
Timwi's user avatar
  • 4,459
26 votes
7 answers
21k views

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 ...
Michael K's user avatar
  • 15.7k
25 votes
7 answers
7k views

I am a C developer for an embedded system. YouTube has recently started recommending "C++ for embedded systems" talks. Having watched some of them, they pique my interest, but none of them answer the ...
Smyther's user avatar
  • 369
24 votes
16 answers
9k views

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

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 ...
Naftuli Kay's user avatar
  • 1,621
24 votes
5 answers
30k views

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 ...
Robin's user avatar
  • 241
24 votes
3 answers
9k views

I am working with a new codebase that makes heavy use of async/await. Most of the people on my team are also fairly new to async/await. We generally tend to hold to Best Practices as Specified by ...
Telastyn's user avatar
  • 110k
23 votes
12 answers
3k views

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 ...
Robert.K's user avatar
  • 391
22 votes
12 answers
6k views

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. However, ...
Stefan Hendriks's user avatar
22 votes
4 answers
6k views

The traditional non AI software with if-then-else and loop statements can be fully controlled. In contrast, machine learning software behaviour is unpredictable since the developer cannot control what ...
curious's user avatar
  • 331
21 votes
5 answers
2k views

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 ...
Bart Friederichs's user avatar
20 votes
5 answers
22k views

First a note, I thought maybe this question belonged in the database exchange, but I think it is more broadly related to a programming solution as a whole than to databases. Will move to database ...
GWed's user avatar
  • 3,263
19 votes
10 answers
3k views

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 ...
Niklas Rosencrantz's user avatar
19 votes
11 answers
6k views

Sometimes, I have a hard time deciding between two good code traits: debuggability and readability. The snippets below are an oversimplification, but they illustrate my pain. Example 1: if(...
AndrasCsanyi's user avatar
18 votes
9 answers
3k views

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 ...
gablin's user avatar
  • 17.6k
18 votes
3 answers
6k views

As you may know, we can use GDB and set breakpoints on our code to pause execution for debugging. My questions is, how does GDB pause a process and let you view the content of registers using i r for ...
Joe's user avatar
  • 197
18 votes
1 answer
2k views

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 ...
Alan Turing's user avatar
  • 1,533
17 votes
4 answers
2k views

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 ...
Thomas Dignan's user avatar
17 votes
2 answers
26k views

What are some good practices in debugging multiprocessing programs in Python?
vonPetrushev's user avatar
16 votes
15 answers
17k views

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 ...
16 votes
7 answers
916 views

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 ...
Shirish11's user avatar
  • 1,469
16 votes
4 answers
28k views

What is a zombie process or thread, and what creates them? Do I just kill them, or can I do something to get diagnostics about how they died?
DeveloperDon's user avatar
  • 4,978
16 votes
6 answers
3k views

(It is not a duplicate: Bug investigation is much more non-deterministic than a defined development task where things to be done are specified. Investigation is about narrowing a huge search space, ...
Stephane Rolland's user avatar
15 votes
16 answers
3k views

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
11 answers
819 views

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 information. ...
ccellar's user avatar
  • 253
15 votes
8 answers
6k views

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 issue/...

1
2 3 4 5 6