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
22 votes
4 answers
6k views

How do AI developers for LLM fix bugs when the LLM misbehaves, given that they cannot control what the LLM learns from the data?

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
4 votes
6 answers
356 views

Should a bug fixer know the overall structure what the program does?

I heard that if you maintain a program, you have to study what the code does. Another engineer said it is not necessary. Just use test cases to find out the function that does not work well, modify ...
user avatar
0 votes
2 answers
322 views

Code platform only accepts manual copy-pasting. How to debug the code locally effeciently?

I'm writing a script for a webapp, which I can only copy my code manually to its platform and not push it from my machine. In the code there are parts that use its API and parts that don't. I cannot ...
Ooker's user avatar
  • 315
18 votes
10 answers
6k views

Code readability and debugging

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

Debugging miscompile [closed]

Recently I encountered an issue at work where a unit test written in C++ would crash only when being compiled with MSVC 2017 (MSVC 2019 and up are fine). I tried to debug this issue and it seems like ...
yijiem's user avatar
  • 107
1 vote
6 answers
854 views

What are some considerations when deciding to fix a bug, or rewrite the code in question?

At some organizations I'm seeing a trend where if a bug is reported, engineers will directly rewrite the offending code without knowing the root cause. In general this will fix the bug, but in my ...
knart's user avatar
  • 127
0 votes
2 answers
106 views

TL suggests that testing, refactor, and tool usage could avoid the need for verbose logging

Additional Context I make infrastructure for automated device testing. Debugging can be very time consuming because the devices have many states and are constantly being updated with new builds which ...
Klik's user avatar
  • 1,675
-4 votes
3 answers
174 views

is it bad practise to go back to your last backup when you encounter an unneccessary bug? [closed]

I find when I am programming and I fix a bug in one area of the codebase, sometimes something slightly related or maybe unrelated breaks, and as a result I usually copy and paste the fix to a ...
jackw11111's user avatar
0 votes
2 answers
466 views

Debugging to track attribute change

I have a very large C++ application running on a *nix environment, which is occasionally setting a particular date attribute on a structure, way off what it should be. I know which structure and which ...
Component 10's user avatar
0 votes
1 answer
186 views

How far can one debug a low-level API in closed-source environments?

Assume a low-level API is provided without source code (e.g. DirectX). The API provides a virtualization of hardware resources (GPU, CPU, audio card, etc.), which enables the user to call hardware-...
chckx592's user avatar
0 votes
1 answer
239 views

A bug was found in my code. Should I migrate the application as planned, or focus on patching the bug?

While testing my iOS application against the latest version, I've discovered a bug. For the purpose of this question, I am omitting the details of the bug. I was planning to migrate the application to ...
moonman239's user avatar
  • 2,063
2 votes
0 answers
129 views

In debugging, how to set breakpoints in expressions?

In (the most widely used) programming languages there is a distinction between "statements" (function or loops bodies, assignments... basically "the stuff that ends with a ';'") ...
Vito De Tullio's user avatar
1 vote
3 answers
788 views

Debug statements in production quality code?

Would anyone here recommend using debug statements such as the following in production quality code? I think these are personally one of the easiest to include or exclude, but they make the code hard ...
love4shells___'s user avatar
1 vote
3 answers
1k views

Is bug fixing and debugging the same thing?

I know debugging and bug fixing are related and generally, bug fixing is considered as a subset of debugging (for example here in Wikipedia, "The process of finding and fixing bugs is termed &...
Oguz Aktas's user avatar
0 votes
1 answer
182 views

How to explain a software bug to a child [closed]

When I buy a house or a car, the product is already completely ready. It's very seldom that an error will be noticed later by the customer. In software engineering, on the other hand, errors (bugs) ...
gaout5's user avatar
  • 41
33 votes
4 answers
7k views

I am spending more time installing software than coding. Why?

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

Debugging: How to debug and analyze concurrent protocols like Raft?

How does one go about debugging concurrent protocols/concurrent algorithms in general? I typically uses the built-in debugger from Intellij/Pycharm, but I find that it fails spectacularly when it ...
nz_21's user avatar
  • 119
2 votes
4 answers
407 views

Bug triage on a micro-services architecture

We do have a micro-services architecture with a team assigned to each micro-service considering it as a product on itself. The "real product" is a front-end that uses multiple micro-services ...
Ignacio Soler Garcia's user avatar
2 votes
2 answers
230 views

When was native debugging first used

I believe this is still on topic. This question comes from a mixture of curiosity and exasperation. A colleague refuses to use native debugging; whether in a stand-alone debugging tool or in an ...
myol's user avatar
  • 235
1 vote
2 answers
126 views

How can I cleanly set up debug logging in my javascript frontend?

I basically want to be able to "turn on debug logging" like you can do with many applications that run in a shell. The naive way of implementing it would be to insert a statement like this ...
temporary_user_name's user avatar
3 votes
1 answer
1k views

What makes a before/after vs. only before approach to logging more effective?

I'm currently developing a server where I find myself asking whether something such as: logger.info("Starting <action_1>.") action_1() logger.info("Ending <action_1>.") ...
Mario Ishac's user avatar
0 votes
0 answers
41 views

Use debug-functionality without breaking architecture

note: This is of couse about software-architecture/design-principles, but as no architecture is completely detached from its language, please note that the language i am using is C++. I am using an ...
LeonTheProfessional's user avatar
1 vote
2 answers
3k views

How to respond to a customer when their bug can't be reproduced

A customer has reported a bug that neither them nor us have been able to reproduce. This is the only report of this bug happening so far. We've spent a lot of time trying to replicate the issue (...
Stein Christensen's user avatar
-2 votes
3 answers
176 views

If you're building an algorithm from the C stdlib in pure Assembly (with no help), what is the best workflow for debugging/iterating?

I am a JavaScript developer mainly, so I am familiar with object-oriented code and dealing with things you can see easily and interact with, like the GUI, even HTTP requests, etc. Plus you can put ...
Lance's user avatar
  • 2,615
1 vote
1 answer
233 views

Developing and debugging code with a logic analyzer?

Until now I used Arduinos with shields and ICs and mostly I used libraries to communicate with i.e. ADC, DAC, Real Time Clock, etc. Now I want to do the same kind of programming with the same ICs ...
Edgar's user avatar
  • 293
3 votes
1 answer
404 views

How to leave debugging information in code before it hits production or even after?

Usually, I open a git branch to work on some task. When I finish the task I send it to be reviewed. Then it's sent to central staging git branch which contains all tasks that have passed review. Our ...
Yos's user avatar
  • 157
-3 votes
1 answer
238 views

Java swing debugging [closed]

I have programmed a Java Swing application. I have some bugs in my program and I want to discover where in the code these errors occurs. With normal code (Non-GUI related code) I apply debugging for ...
jennifer ruurs's user avatar
25 votes
7 answers
7k views

Can abstractions and good code practice in embedded C++ eliminate the need for the debugger?

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
3 votes
3 answers
553 views

Is it really more difficult to debug randomized algorithms?

I am a theoretical computer scientist. I have heard the following: Practitioners do not like randomized algorithms because they are notoriously difficult to debug. So deterministic algorithms are ...
eig's user avatar
  • 147
-1 votes
3 answers
90 views

Is it wise to locally debugging a solution with a framework version that differs from production's?

A small, neglected project has recently been reported by users as having time out errors and some object reference exceptions. As I am a recent replacement for a developer who was responsible for this ...
8protons's user avatar
  • 1,369
2 votes
3 answers
325 views

Design pattern: method that checks consistency of object's internal state

I have got a project in C++. Each of my classes has a method void assert_good() const. The usage of that method is solely for debugging purposes: if the object is an inconsistent/impossible internal ...
shuhalo's user avatar
  • 211
3 votes
1 answer
196 views

When developing for C++ in Visual Studio, is there a quick way of being able to test your code as an exe and DLL?

I'm developing some C++ code that eventually will be compiled as a DLL to be accessed with Python through CTypes. My workflow is generally that of compiling the DLL and running the Python script ...
MW2023's user avatar
  • 133
3 votes
4 answers
3k 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?
veronika's user avatar
  • 139
4 votes
2 answers
385 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 ...
KansaiRobot's user avatar
17 votes
3 answers
5k 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 ...
Joe's user avatar
  • 187
11 votes
5 answers
10k 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 ...
Lance's user avatar
  • 2,615
4 votes
2 answers
2k 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 ...
sudo rm -rf slash's user avatar
13 votes
3 answers
5k 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 ...
Andy K's user avatar
  • 285
1 vote
0 answers
62 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 ...
PaulEdison's user avatar
1 vote
2 answers
1k 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 ...
Jessica's user avatar
  • 349
3 votes
2 answers
2k 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 ...
kentor's user avatar
  • 131
-1 votes
1 answer
74 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 ...
Pepijn's user avatar
  • 337
5 votes
2 answers
9k 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 ...
IceCold's user avatar
  • 151
9 votes
3 answers
6k 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("...
Veneet Reddy's user avatar
2 votes
2 answers
257 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, ...
Wanderer's user avatar
  • 131
2 votes
3 answers
757 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 ...
coroutineDispatcher's user avatar
-3 votes
1 answer
83 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 ...
Gaze's user avatar
  • 111
2 votes
1 answer
139 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 ...
einpoklum's user avatar
  • 2,572
6 votes
2 answers
279 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 ...
Martin Horák's user avatar
2 votes
2 answers
297 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 ...
Pop's user avatar
  • 219

1
2 3 4 5 6