Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

3
votes
2answers
2k views

How to deal with exceptions in DLLs?

I recently started working on an existing project written in C++ Builder. The application consists of a MainModule that loads lots of modules (DLLs). The MainModule itself is a DLL (there is a small ...
3
votes
4answers
271 views

What is hardware debugging?

Could someone give a hint, in plain english, what it means to debug an HDL program? Debugging is understandable as far as it concerns software but at this low level what does debugging means?
3
votes
2answers
337 views

Is there a specific name for this kind of debugging?

Imagine you have a system where a program is running and somehow an abnormality occurs. (it can be a crash, or an abnormal screen or any other thing) Imagine reproducing the problem is next to ...
11
votes
5answers
5k views

How do you debug a binary format?

I would like to be able to debug building a binary builder. Right now I am basically printing out the input data to the binary parser, and then going deep into the code and printing out the mapping of ...
16
votes
3answers
1k views

How does GDB pause an execution

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 ...
15
votes
2answers
10k 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 ...
5
votes
2answers
160 views

Debugging a slow process [closed]

I have a case where a bug takes more than an hour to manifest in debug mode (and still 20+ min in release mode). Does one know a debugging strategy which can help to reduce the waiting time until a ...
14
votes
3answers
4k views

How to affect priorities to bugs to developers and treat them accordingly?

We have a bug process that is currently being worked. We have 3 levels of bug: P1 bug: Bugs that prevents users from working. They must be solved on the spot. P2 bug: Bugs that are impacting but ...
1
vote
0answers
36 views

Logfile correlation finder (for j4Log)

I'm currently analyzing a problem in a old "distributed" system, that only occurs sporadically - as the system does not support other means of debugging help I have to rely on the logs (I did not ...
-1
votes
1answer
154 views

Debugging code in production?

I've come across a problem that doesn't occur in our development environment or test environment, but does occur in our production environment. Obviously, this environment is pretty locked down, and ...
1
vote
2answers
464 views

Developing and debugging microservices locally

The use case: I am working on a microservice based architecture and I am wondering how I am supposed to debug a microservice (with my IDE attached to it) on my local machine where I develop it. The ...
1
vote
1answer
84 views

How to divert IP traffic of 1 site to test new code before deploying

We have a number of IoT devices that communicate over TCP/IP to a server. Once connected, the server can then talk to the device, get data or send down commands. The server accepts incoming ...
54
votes
5answers
17k 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
votes
1answer
69 views

What kind of of tools/architecture would work well for a student team competing in a robot soccer competition?

The scenario is as follows. There is a PC running a complex piece of AI software wirelessly controlling a number of soccer robots. This software is written and maintained by a team of students that ...
2
votes
2answers
177 views

How to debug in visual studio 2015 when your web app. need to login via another web app?

My web app (under development) need to login via http://devWebServer/ExtApp/login.aspx After login via address above, it will pass cookie to http://devWebServer/myApp/Login/Default.aspx and continue ...
6
votes
3answers
781 views

Better conditional debugging pattern?

Given the need to log only in debug mode the easiest way would be to use if conditions: def test(x, debug=False): if debug: print(x) # ...Some more code if debug: print("...
2
votes
3answers
482 views

Difficulties in reading code

I don't have more than 6 months of experience and I am a little lazy . I work on Android platform . I have very good skills in understanding what is happening in general . The problem is that I don't ...
1
vote
2answers
108 views

Testing and Debugging Techniques vs. Rice's Theorem

As far as I got it correctly, as a result of Rice's theorem, the equivalence of two programs is generally not decidable. Nevertheless, there exists a wide variety of testing and debugging techniques, ...
-3
votes
1answer
74 views

Handling different versions of a program and benchmarking with OO

Note: I'm not sure if the way I phrase the question initially will fit 100% on this board, so please help me to focus on the main point. Scenario: You develop an algorithm or a neural network that ...
0
votes
2answers
5k 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 ...
5
votes
2answers
126 views

Logging/Debugging of computer vision apps

When I'm writing an computer-vision program (using OpenCV and Python) I need to print/show a lot of intermediate results in form of images (using cv2.imshow(..)) for debugging purposes to find out ...
2
votes
1answer
119 views

Easy way to debug platform-specific issues of non-GUI software on Windows?

I'm maintaining a couple of software repositories (C, C++ essentially) which I want to also run - or let's start with at least build - seamlessly on Windows. Now, my desktop machine does not have ...
26
votes
7answers
4k views

Split the calculation of return value and the return statement in one-line methods?

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 ...
36
votes
11answers
6k 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 ...
8
votes
1answer
480 views

Create in-browser IDE for own grammar [closed]

We are going to use our new own programming language. We have designed grammar, json parser and everything seems to work. Code in my language is transpiled into javascript and interpreted by node.js ...
0
votes
4answers
308 views

In-Memory Debugger for .NET? [closed]

I don't know if "In-Memory debugger" is really what I mean, or if it's even possible to produce, but it's the best name I could come up with... Here's the tool I'm looking for: Given a variable name,...
5
votes
4answers
1k views

If you follow the rule of Zero, how will you debug the construction of an object?

Everyone is quick to point out the "Rule of Zero" in code reviews, peer conversations, and Stack Overflow comments/answers. I am not a believer. I'd like to be. Usually if enough people agree on ...
-1
votes
4answers
139 views

Identifying code from bug reports

Imagine this scenario: You are relatively new to a very large codebase for a GUI application. A bug report comes in. Since it is a GUI, the report is not expressed in terms relating to functions or ...
3
votes
4answers
251 views

Advice for bugfixing object oriented code: why is data not set?

When debugging object oriented (Java) code, sometimes some field of some object is null while it should not be. I often spend what I feel is way too much time trying to figure out where it should have ...
27
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 ...
-1
votes
1answer
75 views

What techniques to find exact spot of code in a fullstack environment?

I am working on a large J2EE application. I am not very familiar with front end development, and I am trying to trace through the entire application(not in one shot). I am looking at a test case right ...
0
votes
1answer
45 views

Debug class responsibility, accessability

So I'm writing a Flocking System (http://www.red3d.com/cwr/boids/). Each boid calculates it's vectors, I would like to draw these vectors with a helper class for debugging purposes. Who should ...
-1
votes
1answer
39 views

Working On Remote Errors in a Variety of Environments Without FTP or SSH Access

BACKGROUND: I've been developing in PHP for two years - self taught, and beyond the most basic editing, really just a year and a half - but my experience is limited to a small number of environments. ...
0
votes
4answers
221 views

Undoing “fixes”

As someone who hasn't really gotten into large-scale corporate software development--I'm 17, I wanted to ask a question about programming practice. If you encounter a bug in an application, and you ...
3
votes
1answer
136 views

Are there any standards for labelling stdout/stderr messages?

I'm making a console application, and over time I have been developing my own tools and practices for outputting text; a process that keeps evolving. For example, these days I have 4 main types of ...
1
vote
3answers
81 views

Multiple error debuging

Sometimes I ran into errors which are really hard to debug. So my meta question is the following: You have multiple chunks of code, let's say A -> B -> C -> D Your code don't crash but ...
53
votes
10answers
2k 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 ...
4
votes
1answer
144 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 ...
3
votes
3answers
2k views

Should we compile and ship libraries with debug information whenever possible?

There is considerable cost (and pain) for developers to debug external libraries due to the fact that many libraries are distributed in two editions: one with debug information, other without. The ...
0
votes
5answers
247 views

Is unwanted behavior, while work is in progress, declarable as a “bug”?

This might be only a question of definition, but maybe there's a consensus? Given the situation, software Foobar Plus is under construction, we're not working on an update, but on the first release ...
1
vote
1answer
830 views

Console application for developer interviews [closed]

I have been tasked with helping our HR department create some new interview questions for candidates applying for development positions. As part of the process, I would like to assess their ability to ...
33
votes
9answers
4k 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 ...
13
votes
10answers
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 ...
8
votes
3answers
1k views

Is it safe to rely on static analysis to “reproduce” concurrency bugs reliably?

I've inherited some Java code which I suspect harbours some concurrency bugs when synchronizing between a thread that queries data and an IO event that updates the same data. I'm trialling a static ...
1
vote
3answers
284 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 ...
2
votes
2answers
5k views

How to get better at debugging? [duplicate]

How can one become better at debugging in general? I do not mean specific tools or tactics that apply to a certain programming language or stack, but simply how to make your mind better at it, ...
1
vote
4answers
2k 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 ...
8
votes
4answers
361 views

Bug clustering in source code

There are many claims about existence of clusters of bugs or defects. A simple search reveals multiple results, for example: 1, 2, 3, 4, 5. However, all the evidence cited is anecdotal and I could ...
166
votes
9answers
27k views

I changed one method signature and now have over 25,000 errors. What now?

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

Is it my job to enforce my preconditions?

Say I have a function that takes some arguments that fall under a bunch of constraints, e.g. one of them has to be an integer, another has to be a string of length at least 10, et cetera. In general, ...