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)

-3
votes
0answers
27 views

Tracing code flow, on very large projects [duplicate]

I am having a project in javascript, with many thousands lines of code, spread across hundreds of files. I am looking for a way to get familiar with the structure without having to debug and add ...
18
votes
4answers
5k 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 ...
56
votes
9answers
5k views

How do you debug without an IDE? [on hold]

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

Never written much unit tests, how can I practice more of it?

I have an interview coming up soon next week and there's a few things on their list of responsibilties for this software development job (the job position title is vague, it says java developer) that ...
14
votes
2answers
39k 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 ...
-5
votes
1answer
56 views

Proper use of break; [closed]

I am trying to establish my POINT value when the sum is equal to 4, 5, 6, 8, 9, 10, but terminal continues to execute my code even after the break;. Can someone please explain why this is happening? ...
-1
votes
2answers
59 views

Run C program in debug mode (without debugger)

If I want my program to be able to run in debug mode, is it a good idea to make it accept a flag such as -D=DEBUG when I run the program? I currently have a DEBUG variable in a .h file but that I ...
1
vote
2answers
78 views

Replacing buggy component with library: important to identify bug in old component before replacing?

Summary: component used to work and now doesn't, the regression happened 1+ years ago and we're not sure when, now I'm considering replacing the broken and poorly architected component with a mature ...
0
votes
0answers
7 views

Can't find a source file […] allocator.h [migrated]

I am trying to debug a debug example code, which is part of a C++ course materials, with Eclipse. However, once a certain line of the code is reached, this message is displayed and the the rest can't ...
64
votes
17answers
5k 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 ...
0
votes
2answers
157 views

Recognize bug or inability to solve a problem by yourself

How to recognize when there is a bug in program or you have an inability to solve concrete problem? I noticed when I concentrate too much time on a problem and can't find a solution, I am starting to ...
1
vote
1answer
131 views

For Web front end, if there are 20 JavaScript files loading, how to track down the mouseover handler?

For Web front end programming, since any JavaScript can set up an event listener for "mouseover" or "mouseenter" for an element, if we are to track down what is the code that is responsible for making ...
1
vote
4answers
229 views

Naming: objectAction or actionObject? [closed]

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 ...
1
vote
3answers
106 views

Are debug-build-only UI controls a bad practice?

Often, to simplify testing, I add UI controls that are only visible and enabled in debug build only. Or prepopulate mandatory input fields in debug build. Is this a bad practice? Assuming the release ...
8
votes
4answers
2k views

How to start fixing bugs in open source software?

I'm a student with good knowledge in C programming and like to contribute any open source project which is developed in C. I searched SourceForge and selected 7-Zip because its widely used one and ...
2
votes
1answer
369 views

Debugging xml and annotations

By now, most web containers have an annotation variant of their xml configurations for Java EE. I'm guessing this is because it's better to keep things in Java where they can be managed, coded with ...
241
votes
21answers
34k views

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 ...
9
votes
5answers
927 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. ...
0
votes
2answers
171 views

How to analyze a code of a web application which is running? [closed]

Joshua Bloch said in an interview that the best way to know and understand code written by others is to read it, mentally or through a debugger. Well, my question is this: is it possible, through a ...
30
votes
9answers
2k 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 ...
-2
votes
1answer
103 views

Debugging mutually recursive functions

We have a class in which mainly data processing(XML nodes) is done by mainly 3 methods. Now code in itself strictly follows DRY principle. For e.g. Process Children (reads data from child nodes) ...
15
votes
3answers
722 views

How can I diagnose async/await deadlocks?

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 ...
1
vote
1answer
89 views

Should Write-Debug statements be left in production PowerShell code?

This is one of my functions I have in a module: Function Get-DatabaseUser { [CmdletBinding()] Param() Write-Verbose 'Getting database...' $Database = Get-Database ...
41
votes
5answers
9k views

Why is reverse debugging rarely used? [closed]

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 ...
1
vote
2answers
99 views

How to determine if there's something wrong with my code or a bug in the library

I'm working with Meteor, which is a relatively young Javascript framework. As such, it seems like I often run into problems which haven't been asked on Stackoverflow already. In one such case, I was ...
1
vote
3answers
97 views

How to debug javascript in browsers that don't have a console interface? [closed]

It's unbelievable but my company is still building web app on IE 6. Although the online dashboard for IE 6 is limited in functionality, I've found extremely difficult to debug anything on it. It's ...
1
vote
3answers
165 views

Is a logical error always caused by the line of code for the earliest program state which is wrong? [closed]

A logical error, contrary to a fatal runtime error, is a run time error which doesn't fatally terminate a program, but does something not intended. Is a logical error necessarily caused by the line ...
14
votes
3answers
704 views

How to locate source code that implemented a certain feature? [closed]

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 ...
-1
votes
1answer
920 views

What is an Integration Point?

How is an Integration Point defined within the context of an application? I've heard about it in a programming course but couldn't grasp the concept in a way that I could distinguish an integration ...
3
votes
2answers
277 views

Methods of “Code Softening” (Opposite of “Hardening”) for C & C++ [closed]

Some developers work on code hardening. (protecting against errors, you can build with a stack protector for example). However, if you're trying to redo a strange someone else reports, or find ...
2
votes
0answers
77 views

Reducing conditional code makes assessing coverage or debugging difficult

Working in Python, I've written a few utilities to assert pre-conditions and to re-interpret exceptions, and have found my code doesn't have so many branches. I've also tried to move other code path ...
25
votes
7answers
3k views

What's the best way to avoid catastrophe caused by negligence? [duplicate]

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 ...
9
votes
11answers
28k views

What is the difference between debugging and testing?

Introduction To Software Testing (Ammann & Offutt) mentions on p.32 a 5-level testing maturity model: Level 0 There’s no difference between testing and debugging. Level 1 The purpose of testing ...
1
vote
1answer
92 views

Should I put stack trace in error files and halt my app with user friendly error [closed]

In my earlier project I wrote an app that is used in-house. My usual practice is to capture errors/exceptions from different classes and threads and put them in different log files corresponding to ...
-1
votes
2answers
212 views

How to debug a program after it appears to fix itself [closed]

While chasing a segfault around a complicated and grouchy c++ program I added several //comments and cout statements, but no 'actual' code. Then, suddenly, for no apparent reason the segfault ...
0
votes
0answers
36 views

Ipython3 development cycle

I am new to python (python3) and am using Ipython3 while writing the code just in my preferred text editor. I am not yet sure what is a good development cycle as I keep getting problems with reloading ...
13
votes
6answers
1k views

Time estimating of a complex bug investigation (not a straight-forward one) [duplicate]

(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, ...
42
votes
17answers
16k views

How to check or assess debugging skills of a person? [closed]

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 ...
3
votes
4answers
145 views

Approach to module development and testing

I have read somewhere that the cost of resolving bugs increases if it is not resolved at the initial stage. Which approach should I take while creating programs? Divide program development in ...
2
votes
3answers
1k views

Using System.err.println() for debugging in Java

System.err The "standard" error output stream. This stream is already open and ready to accept output data. Typically this stream corresponds to display output or another output ...
1
vote
2answers
104 views

API for expanation of complicated calculation or business rules?

In online shops there are areas with complicated rules. For example is a product visible in the product catalog is a product sold out what is the price for the product (Discounts, Promotions, ...) ...
1
vote
0answers
84 views

Curiosity: Unassembled asm in Windows Bootloader

I found this little gem waiting for me in the Windows (10/TP) bootmgr located on the first 300+- MB partition. Can anyone explain to me what it does? Is there an assembler hidden somewhere? These all ...
21
votes
12answers
3k 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. ...
2
votes
2answers
124 views

Managing scaffolding for debug vs production builds

The more I program the more I realize that most of my time is spent writing scaffolding for programs so that I can debug them and then strip away the scaffolding for production. The problem is that ...
1
vote
3answers
354 views

How do you debug a complex application? [closed]

I have an application that is returning the wrong output, when it is run with a particular input choice. I haven't been able to get anywhere near a diagnosis of the fault, despite spending about a ...
0
votes
2answers
818 views

Is it possible to prune the stacktrace returned for a custom exception in PHP

I am working on a project in PHP that does a lot of input validation and can throw different custom exception classes in various layers of the application. To make the project code easier to read, ...
1
vote
4answers
358 views

Pesky bugs - nonexistant?

Very short introduction (this is quite a context-heavy question): I'm a 17 year old programmer, doing some projects, usually netting around 20 files of 200 lines each. I usually don't program very ...
0
votes
3answers
315 views

Who fixes bugs in a team? [duplicate]

In an agile software development team, who would be the one to fix the bugs introduced in an update? The developer who writes the feature? Someone else specialized specifically in debugging with a ...
25
votes
3answers
5k 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 ...