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.
1
vote
2answers
71 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 ...
1
vote
1answer
176 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 ...
8
votes
4answers
257 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 ...
159
votes
9answers
26k 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
126 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, ...
3
votes
3answers
362 views
What is the difference between debugging and antibugging?
The terms debugging and antibugging seem to be widely used for referring to tools, measures and design patterns to get rid of bugs.
After reading Peter Norvig's Paradigms of Artificial Intelligence ...
3
votes
0answers
98 views
Create in-browser IDE for own grammar
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 ...
4
votes
1answer
96 views
What is a good way to debug when does a specific value is pushed onto stack in assembly code?
I am currently debugging a very old game (so there is no customer support) that keeps crashing under certain condition and I have found out it is because unsigned short to unsigned int conversion was ...
0
votes
0answers
27 views
Implementation success testing inside production system
Thanks in advance for any help or ideas.
The project I am currently working on is enhancing a rather complex and poorly made system to help the implementation team implement quicker and without ...
2
votes
2answers
50 views
How can I track down a dependency that is causing an X509TrustManager error without having the source?
I am maintaining and Android app that now suffers from an unsafe X509 TrustManager implementation. Since the app doesn't make any HTTPS calls except through dependencies, one of the dependencies is ...
0
votes
2answers
219 views
What is a debug port
I want to explore code paths in Cassandra database, so after getting the code from git and explore it a bit I noticed that it starts a daemon process when I run it from Eclipse. I supposed that when ...
-1
votes
2answers
233 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 can'...
1
vote
2answers
83 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
2answers
193 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
158 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
3answers
122 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 ...
-2
votes
1answer
108 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)
...
1
vote
2answers
116 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
102 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
204 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 ...
16
votes
3answers
2k 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
140 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
Write-Debug('...
-1
votes
1answer
2k 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
332 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
82 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 ...
1
vote
1answer
105 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 ...
0
votes
5answers
222 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
votes
2answers
256 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 vanishes....
14
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, ...
2
votes
3answers
3k 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 destination ...
2
votes
2answers
179 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
526 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
3answers
519 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 ...
26
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 ...
248
votes
21answers
36k 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 ...
0
votes
2answers
48 views
How do we sequence logs from different services in a system?
So, if I am designing a system as a set of different roles (client, app-server, backend services 1 to n). Each of these roles will have their own logging mechanism. I can aggregate all the logs at one ...
1
vote
0answers
90 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 ...
9
votes
5answers
272 views
Correctly disposing objects upon server termination
I am working on a large C++ project. It consists in a server that exposes a REST API, providing a simple and user-friendly interface for a very broad system comprising many other servers. The codebase ...
12
votes
5answers
726 views
How can I encourage people to read error messages? [duplicate]
I was wondering if there are some good ways to encourage people to read error messages when the compilation fails.
People (especially) the junior ones usually ignore the error messages and just ask ...
-2
votes
1answer
104 views
Is software inherently buggy and hence, vulnerable? [duplicate]
Could no amount of formal analysis, type/rule checking prevent it's exploitation?
How about a fully verified kernel such as SEL4 ?
5
votes
6answers
1k views
When should you start unit testing? (during which development stage?)
I'm currently learning about unit testing, specifically JUnit (with Java).
Searching the web I see many threads talking about why you should use it, what type of methods you should use it with but I ...
4
votes
1answer
2k views
How to debug minified javascript on production? [closed]
I have a front end single page app deployed on S3. It is minified on production.
It creates error only when it is minified via grunt on production.
I cannot repro the issue in dev.
How do I go about ...
6
votes
6answers
1k views
What is the actual reason that locks (sentinels) in OO are hard to reason about? [closed]
In this talk, Rich Hickey introduces Clojure. He gives an Ants demo and talks about his motivations for implementing a Software Transactional Memory (STM) system.
His reasoning for STM is that "...
3
votes
2answers
477 views
How to avoid long call chains?
I have a hierarchy of objects, mostly connected by composition. I.e. (not showing the class methods for readability):
class A {}
class B {A a;}
class C {B b;}
etc...
class Z {Y y;}
class Z provides ...
0
votes
1answer
184 views
Extending a class for debugging: public API, hidden implementation or something else?
I'm working on a fairly large project that involves 3D drawing, and I want to add some visualizers (for example, to see the bounding boxes of the objects) to make debugging easier. However, I'm having ...
2
votes
1answer
455 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 ...
-2
votes
2answers
84 views
Debug symbols change application execution [closed]
I have to set up remote debugging for a multi threaded application running on a embedded device. C++ is the language.
I've gotten so far and got the remote debugging working for a simple application, ...
2
votes
1answer
421 views
Writing software without unit testing
Usually, when I write software, I use unit tests for each function to test if it is working without any problems. However, recently I have found myself writing some software that are not really ...
-2
votes
1answer
2k views
Illustrate Meaning of : gcc -g programName.c
To debug a C program using gdb effectively it is required to compile it first using the command:
gcc -g programName.c
otherwise on using simply
gcc programName.c
and running we are unable to ...
0
votes
2answers
150 views
can a logic error happen way later than its cause? [closed]
For comparison, for a runtime fatal error, it is often that the cause of the error is way before the error crashes a program.
For a logic error, it doesn't crash a program. It happens when the state ...