What is Debugging: Definition and 50 Discussions

In computer programming and software development, debugging is the process of finding and resolving bugs (defects or problems that prevent correct operation) within computer programs, software, or systems.
Debugging tactics can involve interactive debugging, control flow analysis, unit testing, integration testing, log file analysis, monitoring at the application or system level, memory dumps, and profiling. Many programming languages and software development tools also offer programs to aid in debugging, known as debuggers.

View More On Wikipedia.org
  1. Vick

    Fortran Can Fortran 77 Code Be Used to Debug Python Code for Solving ODEs Using Radau5?

    Hi, I have a piece of Fortran code but I'm not Fortran literate. I'm trying to translate it into Python. I have already made it, but I need someone who can run the Fortran code to compare the values of the variables.
  2. A

    Help debugging MCNP code - particle lost and zero latice element found

    I keep getting particle lost error even though there were no hole in the lattice. Can someone identify any mistake in my code?
  3. Superposed_Cat

    Debugging a Backprop Neural Network: Issues & Solutions

    I am trying for the first time in 5 years, to make a n- layer, m-width backprop neural network from scratch, My issue is, I've tried training it on XOR, where it returns 0.48 for any of the inputs instead of 1 for half of them and 0 for the other half, if you give it a dataset where the outputs...
  4. shivajikobardan

    MHB Debugging Algorithm Logic: 2 Iterations & Finding Right/Wrong Answers

    https://lh3.googleusercontent.com/J-M_R31KFl76aXCRE4sxzAWI6iAldXG9fMI2k4YRMZo6vZY0w1DPUfV7tLc1w5IsVQX8uUkjgThzROZrbb3bc6kluAEmyiH63Z4BsXKT5Xr7X7mLxOwbR1L0y3ttoLitS6bOnwz- Here is a solution, part of which doesn’t make any sense to me-: ->Why did we select c3,c1 and c3,c2 for 2nd generation...
  5. D

    I Simulation debugging for Apollo Lunar Landing

    My simulator is trying to mimick the actual conditions of the Apollo landing. I have entered in numbers for my runge kutta simulator for LEM mass, dry mass, fuel, thrust of the rockets, fuel burn rate per second etc etc. But I am not able to land, only very close to landing. I copied the...
  6. m4r35n357

    Python Graphical Debugging with Eric for Python Developers

    I guess all Python devs know about PyCharm (commercial, but with a gratis (community) version) which has a really nice debugger built in. Perhaps you don't know about Eric. Eric is nice when you don't have an x86 based computer (Raspberry Pi), or an x86 not running one of the OSs supported by...
  7. Israr Ahmad

    Can anyone teach me how to debug a program?

    I want to know what kind of programs can be debugged and how to do this?
  8. L

    MHB Solving 'Simon Says': Debugging a For Loop Problem

    I have tried a bunch of different ways to edit this problem. The user input is 4 and I keep getting a output of 8 or 0. I appreciate the help! The problem is: "Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequence...
  9. N

    MHB How Can You Debug Code Effectively in Dev C++?

    I am learning how to debug codes and would like to debug someone code using dev c++ :D. Not too hard or too simple of a code.
  10. Prof. 27

    Comp Sci Problem with C++ Information Structures, Pointers, Arrays

    Homework Statement So I'm getting an error when I try to compile my C++ code: Debug Error Abort() has been called I have commented the code reasonably well, but the idea of the program is to take a file, separate the contents in each line to a part of a structure containing: Product Lookup...
  11. BiGyElLoWhAt

    Python Debugging the Swarzchild Metric - ValueError

    I'm messing around with the swarzchild metric, and I keep getting errors. First, it was a memory, which I could have guessed, 10000x10000 array, so I lowered it to 1000x1000 and it moves past that point, now. However, this is where I'm getting my error: Gravity = zeros([1000,1000]) while i <...
  12. Mark44

    Simple Python Debugging with Pdb: Part 2 - Comments

    Mark44 submitted a new PF Insights post Simple Python Debugging with Pdb: Part 2 Continue reading the Original PF Insights Post.
  13. Mark44

    Simple Python Debugging with Pdb - Part 1 - Comments

    Mark44 submitted a new PF Insights post Simple Python Debugging with Pdb: Part 1 Continue reading the Original PF Insights Post.
  14. W

    Troubleshooting a Trap: Debugging the Trapezium Rule

    This is not giving me the right answer! I have checked for errors like integer division and rounding, but can't find any. I am aware the comments are slightly inaccurate and they will be improved. But what's wrong with the actual code? //This method uses the trapezium rule to calculate the...
  15. nomadreid

    "Cannot create Application Data Folder" (Skype debugging)

    In Skype, I am getting “Do you want to debug this webpage? This webpage contains errors that might prevent it from displaying or working correctly. If you are not testing this webpage, click No.” Then, I can click or not click "Use the built-in script debugger in Internet Explorer." (No...
  16. Domenico94

    C/C++ C++ vs C Debugging: How Hard Is It?

    How hard is c++ debugging compared to c? What do you think o f the sentence: "It s easier to shoot your foot in c. In c++ it s harder, but when you do, you blow away your whole leg"? Is it really hard( considering the fact code isn t "context free" and it may vary from compiler to compiler, it s...
  17. H

    Debugging: My Unexpected Result of n1=75

    The program below gives the result n1=75 wheras I expect to get n1=25. What is my mistake? [C O D E] clc clear all n1=0; for n=1:5 for m=1:5 n1=n1+m; end end n1 [/C O D E]
  18. F

    C# [C#] Console.WriteLine Debugging

    Hi, how can I debug the C# command Console.WriteLine("text"); so I can see what windows operating system code gets called? Is it possible to go to lower levels? Ie. see what code gets called to make the pixels light up on your monitor to display the text? I know that's really low level, and...
  19. S

    Comp Sci Debugging a Program to Add Up Monthly Sales

    Homework Statement This question is rather easy. It is compiled online with CodeLab. For some reason my program executes perfectly except for one of the trials. Here is the question: Given a type Money that is a structured type with two int fields, dollars and cents. Assume that an array...
  20. T

    Understanding cygwin debugging messages

    I'm working on a program for my intro level c class. This program is supposed to take in some text and then tell you the number of occurances of each letter used (among other things). Initially I was getting a segmentation fault whenever I ran the program. I tried running the debugger to help...
  21. S

    Debugging Lower-Triangular Matrix Multiply with BLAS strmm()

    Right now, I'm putting together a program to perform a lower-triangular matrix matrix multiply, which should be straightforward, but I'm getting crap results. I'm using BLAS's strmm (s for single precision) and the call is of the form: strmm(&side, &uplo, &transa, &diag, &N, &N, &alpha, *A...
  22. 1

    Moving point charges - help debugging

    Homework Statement See attachment Homework Equations The Attempt at a Solution I was successful with finding a solution. But, only because I tried the practice version of that (where you can see the answers) and noticed the equation I derived gave angles that, when summed with...
  23. J

    How can I use the offset property in VBA to populate a variable in Excel?

    Hello all. I am trying to get my code to color cells if a referenced cell is populated. That part works but when I tried to populate another cell a different color I encountered a problem. You can see where the mistake comes in on the code. It is when I try to populate a variable 'strMyVar'...
  24. Q

    MATLAB Debugging a Plot of V vs. z2 for June 7

    Code: mu12=5; mu123=20/21; z1=1:15; z2=-10:0.05:10; counter=1; index=1; count=1; indexer=1; m=1; n=1; for l=1:1:15; for p=1:1:401; x=(sqrt(mu12)/10)*z1(n)+z2/(sqrt(mu123)); y=(-(sqrt(mu12)/10)*z1(n))+(z2/(sqrt(mu123))); z=1:401; z(indexer)=z1(n)/sqrt(mu12)...
  25. A

    Help with Intro Programming: Debugging Errors

    hey I am doing a intro programming class and I am running into some problems. would really appreciate some help to see where I went wrong. Been trying to figure it out for hours now. Someone please help me out These are my errors c: In function ‘main’: c:33:9: error: expected identifier or...
  26. S

    Comp Sci Troubleshooting a Polynomial Function in Java

    Homework Statement We must make a class used to evaluate a polynomial function of x. My problem is I am getting an array out of bounds exception when I run the main, and I can't figure out why. If you could help me figure out this out of bounds exception it would be very appreciated thank you...
  27. Pythagorean

    Debugging equations. vectorized vs. for-loop

    I get different results from these two functions. I need a fresh pair of eyes to help me find the discrepancy. The old way I did it, with the for-loop, gave proper results (but is slower, I think).VECTORIZED (wrong): Nss = .5*(1+tanh((y(1,:)-V3)/V4)); %N as t --> inf tau =...
  28. A

    Comp Sci Fortran debugging help: faulty pointers?

    Hi, I tried compiling my program in Fortran using the following commands: nagfor -g90 -C=all -C=undefined -g -gline -nan -u -mtrace=all test09b.f90 cell_functions.o -o test09b I ended up getting this error message: [Allocated item 15285 (size 17) = Z'FFFFFFFFB744A790'] Runtime Error...
  29. C

    C/C++ How to learn assembly code for debugging VC++?

    Sometimes when I try to debug my codes, VC++ brings me something I believe are assembly codes which I couldn't read at all. I want to know where I can learn these to better understand what is going on at low level. I am quite comfortable with high level programming, but I believe I really need...
  30. B

    MATLAB, help debugging my code.

    I'm asked to create a function that accepts any number of inputs, then computes the sum of all the arguments. I am asked to test the function using the four arrays, a,b,c,d defined in the calling program. Here is my code: When I run this, I get these errors: ? In an assignment A(I) =...
  31. J

    Matlab debugging for LU decomposition

    these are my mfiles for Lu decomposition with partial pivoting and substitution 1.LUdecomp.m function [x]=LUdecomp(a,b,n,tol,er,x) for i=1:n o(i)=0; s(i)=0; end er=0; decompose(a,n,tol,o,s,er) if er~=-1 substitute(a,o,n,b,x); end end 2.decompose.m function...
  32. M

    Debugging Encoding/Decoding Program with White Space Issues

    i am trying to write a program that encodes and decodes. my code works fine for encoding 1 string of characters with no spaces, but when there is any type of white space, it fails. also, when i try to decode, i get a random mix of characters and symbols. any help would be appreciated. for...
  33. D

    Comp Sci Debugging a C++ Keygen Project: Win32 Console Application

    Hi guys, I'm working on a keygen project on C++. Type is Win32 Console Application. For what I've learnt, I'm using stdio.h, conio.h, stdlib.h. time.h so everything is in printf and scanf (not using cin cout namespace std etc) So far I have not yet learned strcompare, dynamic memory so I have...
  34. F

    Assembly level debugging problem

    Homework Statement (This is x86 Assembly Language.) You are charged with maintaining a large C program, and you come across the following code: typedef struct{ int left; a_struct a[CNT]; int right; } b_struct; void test(int i, b_struct *bp) { int n = bp->left + bp->right...
  35. L

    LaTeX Debugging Latex Code: 28 Errors and Still Trying

    hi. not sure if this is the right forum. i have latex code that I'm trying to get to print but it's giving me 28 errors and i can't find any of them i've got it to display nice but I'm still getting 28 errors when i run and they're all apparently related to missing brackets and stuff but i...
  36. Artlav

    Debugging a Tesla Coil: 6 Questions Answered

    I'm trying to build a Tesla coil, for the first time, and have some questions. Whatever sources i came across on the internet only tells how to build one out of household items, trash, radio shack components, etc, but not why and which way the thing works. The thing...
  37. R

    Debugging C Program for Outputting Array Elements

    C programme ? Homework Statement /* Program-8.4 */ #include <stdio.h> int main() { int marks[5]= {89, 45, 73, 98, 39}; printf("%d\n", marks); //memory addres pointed by pointer printf("%d\n", &marks[0]); //memory address of 1st element printf("%d\n", *marks)...
  38. J

    Debugging a FOURTH program 1992 era

    I work at a Bio tech company in Ma. We manufacture a Feline Leukemia Virus vaccine. We currently use a TCS 6366 controller(1987 vintage) to control our pH in our 500 L fermenter. The 6366 controller has been giving us some erratic out puts. We would like to program another 6366 as a backup so...
  39. P

    Debugging a C++ Program to Replace Strings

    Homework Statement Ok, i need to make a program that will search for a substring in a given string, and replace it with another one.The Attempt at a Solution #include<stdio.h> #include<iostream> #include<string.h> using namespace std;int fsubstitute(char *ulazni, char *prvi, char *drugi)...
  40. Artlav

    Debugging Van De Graaff generator

    I'm trying to build a simple Van De Graaff generator, for the first time. The problem is quite obvious - the current generated is zero. Can somebody help to find what is wrong? The column is a typical sewer pipe, axles are aluminum bars, electric screwdriver acts for motor. The upper...
  41. J

    Debugging Logic Flow: Tips and Tricks

    Never mind there, I screwed up my logic flow
  42. S

    Fortran Debugging Merge Sort Program with Fortran 90

    I'm trying to write a Merge Sort program with fortran 90. However, this is what I already could do: program sorting integer :: i,ialloc,error,n,d integer, pointer :: a(:) Print *,'How many numbers would you like to type in?' Read(*,*)d Print*,' Enter the values, separated by...
  43. B

    Debugging an Infinite Loop in MATLAB

    Homework Statement I am having a bit of a problem trying to understand while loop. I was given a question lke this Write a while loop to evaluate the spl of effective pressure p starting from pref and increasing by a factor of 2 at a time.The program should stop when the spl...
  44. B

    Fortran Debugging Fortran Program: Getting Fluxconv Value

    Hey, I wasn't sure whether or not to put this in the homework section or not because I need to complete this code for an assignment, but I thought that someone with fortran knowledge might have a better chance of seeing it in this section. PROGRAM testing ! Variable declarations CHARACTER...
  45. N

    Mathematica Debugging Weird Mathematica Behavior

    Hi all, I have attached a notebook which I am doing a calculation in. For some reason, Mathematica is acting inconsistently. When I run the calculation for the first time, it usually doesn't work. By that I mean I get the output that you can see in the notebook attached. You can that...
  46. J

    C/C++ Debugging My Matrix Class Implementation

    Hey all! I'm new here. I actually joined for physics help a couple of days ago, but I found the answer by searching through old threads and didn't have to post a new one. So here's my first post. :smile: Anyway, so I procrastinated on my homework, and now I'm having trouble with it and no...
  47. C

    Java Debugging Java Code for User Input Decryption

    Here's what I wrote , but there's no output.. It is suppose to read a line typed from the user and enter whatever the input was with the letter after the ones inputted. please help import java.util.Scanner; class ProblemS2 { static Scanner sc=new Scanner(System.in); public static...
  48. F

    Debugging Code in Dev-C++: Solving an Unexpected Disappearance

    Ok, I'm trying this code in Dev-C++ int main(int argc, char **argv) { double **a; double *b; // double *m; int n, iter; double tol; b = new double[n]; a = new double*[n]; for (int i = 0; i < n + 1; i++) a[i] = new double[n]; // m =...
  49. B

    Debugging Craps Simulating Game: Tracking Wins & Losses

    Hi , I have a problem coding a part of a simulating game: In the game of craps, a "Pass line" bet proceeds as follows. The first roll of the two, six-sided dice in a craps round is called the "come out roll". The bet immediately wins when the come out roll is 7 or 11, and loses when the come...
  50. C

    Printf Debugging: Explained for Beginners

    Hi there, I'm noob at programming. Can anyone explain me why we need printf debugging, how to implement it, and for what is used it? Thank you