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)

4
votes
3answers
123 views

How do I fix an “emergent” bug?

I'm writing a PDE solver, and I have a bug that only shows up in very large test cases. That is, with small grids the program gives correct answers, but there's a large amount of unaccounted-for error ...
18
votes
4answers
4k 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 ...
-3
votes
1answer
95 views

Step into and Step over Visual Studio C# [closed]

My problem is realy strange, im working in Visual Studio 2013 and when i just build solution and debugging has a stable value 16, but when i debugging step by step the final value is diffrent every ...
0
votes
0answers
14 views

Debugging audio streaming on Windows [migrated]

Apologies if this is the wrong venue for this question and I also apologize if this is too vague, but over the past few weeks, I've kind of exhausted my creativity in attempting to debug this problem ...
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 ...
4
votes
5answers
2k views

What is a practical way to debug Rails?

I get the impression that in practice, debuggers are rarely used for Rails applications. (Likewise for other Ruby apps, as well as Python.) We can compare this to the usual practice for Java or ...
2
votes
2answers
77 views

Does anyone still use logic analyzers for debugging real time systems?

Many years ago when debugging real time systems (such as the ones used in telephone switches) we had to use logic analyzers (which read execution straight from the CPU) or emulators (which physically ...
2
votes
2answers
54 views

Methodology To Determine Cause Of User Specific Error

We have software that for certain clients fails to download a file. The software is developed in Python and compiled into an Windows Executable. The cause of the error is still unknown but we have ...
1
vote
4answers
285 views

Why do browsers these days ship with dev tools [closed]

I just read a question asking how Facebook blocks console-based script attacks. The reason for this block was to prevent a recently famous "hack" where one would trick a user to inject a malicious ...
11
votes
5answers
795 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 ...
2
votes
1answer
201 views

How to manage stress from ongoing difficult maintenance? [duplicate]

I recently signed on to a contract where I am supporting an aging legacy system. The system is a collage of .net and VBScript components. Part of it operates as a web application; part of it ...
14
votes
3answers
595 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 ...
16
votes
11answers
572 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 ...
1
vote
11answers
458 views

Is debugging a waste of time? [duplicate]

I work on a lot of projects for fun, so I have the freedom to choose when I want to finish the project and am not constrained by deadlines. Therefore, if I wanted to, I could follow this philosophy: ...
0
votes
1answer
77 views

debugging web applications using debug parameter

A suggestion has been made by a team member to leave all debug code intact in our web pages... and then to create a variable that can be turned on / off to enable / disable debugging. This is a ...
1
vote
5answers
373 views

Should unit-tests be entirely self-contained? [duplicate]

As the title suggests my question is whether or not unit-tests should be entirely self-contained or can one rely on the results yielded by previous tests? What I mean, in case that it isn't entirely ...
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 ...
3
votes
4answers
472 views

When should a database table use timestamps?

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

Is printing to console/stdout a good debugging strategy?

Let's say we have a function like this: public void myStart() { for (int i = 0; i<10; i++) myFunction(i); } private int myFunction(int a) { a = foo(a); a = bar(a); return a; } ...
24
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 ...
1
vote
3answers
183 views

Debugging checklists: How much it's necessary to have? [closed]

Should making debug-checklists be an essential part of development process? How it can be integrated with unit-tests? Update Debugging checklist: Think about it as your troubleshooting checklist -- ...
1
vote
4answers
209 views

How to trace logical errors in algorithms [closed]

I am beginner in algorithms. Last year I participated in Google Code Jam. One of the major issues I faced during the competition was my code was working fine on my test cases, but when I submitted on ...
4
votes
2answers
305 views

How do you build debugging messages into your programs/scripts?

General, high-level question for people who work with code regularly. I was repurposing some old, outdated Javascript code into a Chrome extension, and to help me understand it, I wrote some quick ...
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 ...
1
vote
2answers
73 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, ...) ...
3
votes
2answers
182 views

Verbose or concise logging [duplicate]

I was wondering how much data should be logged. I know this deeply depends on multiple factors. But it can still be hard to find the golden middle way. Lets say I have an application where people ...
1
vote
3answers
288 views

How do you avoid looping mistakes? Mistakes that are not detected by systems [closed]

I had this crazy initialisation -- documentList = new ArrayList<Map<String,Integer>>(); which I intended to store a new map everytime in a loop but unfortunately put itself inside the ...
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 ...
-3
votes
2answers
220 views

What are the signs that a ten days debugging session will not resolve an issue? [closed]

Ten days ago, we fixed a bug on a large application and the hot fix has created a disappearing of some data from the user point of view (side effect). Data are not deleted, but have been set to hidden ...
2
votes
2answers
246 views

Is it realistic to use designers for complex UI [closed]

When I created my first web application few years ago, I remember trying to use the designer in VS 2008. Before I can even remember I abandoned it to the favor of actual debug to understand how my UI ...
1
vote
3answers
236 views

What techniques are there for debugging remote client side errors?

What techniques are there for debugging remote client side errors in a web application, especially when they only affect a small subset of users? In my case we have an app that is working well for ...
-2
votes
1answer
160 views

PHP developer, how to solve javascript related issues in a program with millions of line [closed]

I am expert in PHP. There are some JavaScript related bugs in my assignment given by my supervisor. I tried to fix them using Firebug. It is time consuming. Is there any other ways? Are there any ...
2
votes
2answers
241 views

When is it okay to log filename/line information for errors?

We have a closed-source commercial C++ application. Some of our logged error messages are in plain English like "ERROR: could not read file 'foo'". While others use a macro to print filename/line ...
0
votes
1answer
773 views

Best way to quickly explore/grok open source C/C++ projects? [duplicate]

I'm looking for a suggested workflow for quickly being able to download various c/c++ open source projects and then begin intelligently navigate sources. "Intelligently" means being able to jump ...
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 ...
-1
votes
1answer
339 views

Is there a tool that visually represents all the potential paths to a particular piece of code? [closed]

As an example of what I need and why I want it, I am trying to determine how a certain value (CurTotal) is getting set (wrongly). I've come up with these notes to myself to try to understand just what ...
13
votes
11answers
714 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 ...
1
vote
1answer
194 views

How do I go about debugging a PHP error?

I am coming from .NET to PHP. I am playing around with a long file written by someone else (called "cryptographp.inc.php"). It builds and returns an image to the browser. I want to show the image ...
0
votes
4answers
140 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 ...
4
votes
2answers
343 views

Writing Large Portions Of Code Then Debugging?

Lately I have been writing a game engine, and I have been writing a lot of "foundation stuff" (standard interfaces, modules, a message system ect.), but I have noticed a pattern, a lot of the stuff is ...
2
votes
2answers
170 views

Building Websites: Fast Debugging Without a Browser

Is there a methodology to debug websites without a browser? Normally I use a web browser to view a results page. The slow debugging process confuses me a little. To correct an error I need to switch ...
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 ...
14
votes
1answer
600 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 ...
0
votes
2answers
163 views

How to quickly adapt to a project?

Suppose my favourite open source application has a bug. Now I want to contribute to the application by fixing its bug and submit the patch to the development team. What's the most effective way to do ...
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 ...
-1
votes
1answer
243 views

Is reverse debugging possible? [duplicate]

I know there are some products for reverse debugging. I am wondering that does reverse debugging mean going to one step back or starting over again up to one step back? I've found an explanation ...
1
vote
5answers
1k 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 ...
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 ...
3
votes
1answer
161 views

Self Debuggable systems

For example, in case of GDB it is possible to debug itself by itself. I have not been able to find any JVM that can debug itself or even allows debugging on source level. I was just wondering if ...