Click here to Skip to main content
15,887,267 members
Everything / General Programming / Debugging

Debugging

debugging

Great Reads

by PJ Arends
Trace your function calls to the Output window.
by Giovanni Scerra
Patterns to prevent null reference exceptions
by Maxim Kartavenkov
The series of articles covers most aspects of logging and tracing mechanisms which can be embedded into your application. It discusses simple ways of tracing and also new tracing technologies which were involved in Windows 10.
by David A. Gray
Historically, ETW has been portrayed as having a very steep learning curve, along the lines of the effort required to summit Everest. Realizing its potential value, I set about to reduce the effort to that required to summit Pike's Peak.

Latest Articles

by PJ Arends
Trace your function calls to the Output window.
by Maxim Kartavenkov
Discussion of how to organize saving application trace helper information.
by Maxim Kartavenkov
Continue discussion of the simple kernel drivers tracing mechanisms by using output information into the handles of the files pipes and console passed to the driver from the host application.
by Maxim Kartavenkov
Discussion of simple ways of tracing and also new tracing technologies involved in Windows 10

All Articles

Sort by Updated

Debugging 

9 Apr 2024 by PJ Arends
Trace your function calls to the Output window.
29 Mar 2024 by DosNecro
/* Rasal Amarasurya */ /* 21304178 */ #include #include #include /* For malloc, free */ #include "game.h" /* Include the game header */ void initializeGame(char **grid, int rows, int cols, FILE *file, int...
29 Mar 2024 by merano99
CPallini is right! The comment in the source code says that the initializeGame() function should determine the player position. int playerRow, playerCol; /* Removed the initialization here as it's set in initializeGame */ However, the prototype...
28 Mar 2024 by CPallini
You failed to properly initialize playerRow, playerRow variables. Put a breakpoint at movePlayer function in order to see that live.
5 Dec 2023 by sunday udegbu
PLEASE TRY REPLACING SOME OF YOUR CODE WITH THE FOLLOWING: //use GUID to get unique name for every capture file. Something like: string guid = Guid.NewGuid().ToString(); captureBitmap.Save(@"D:\Capture-" + guid + ".jpg",ImageFormat.Jpeg); ...
28 Nov 2023 by Babar Ali Nov2023
I have a camera device in device there is button in camera to capture the image I have having a issue when I capture the image with camera device the camera location is not in original size and image is cutting when I click on the form save...
8 Sep 2023 by Member 16088741
I found it here: C:\Users\user\AppData\Local\Microsoft\WindowsApps\WinDbgX
18 Aug 2023 by Maxim Kartavenkov
Discussion of how to organize saving application trace helper information.
5 Jul 2023 by Maxim Kartavenkov
Continue discussion of the simple kernel drivers tracing mechanisms by using output information into the handles of the files pipes and console passed to the driver from the host application.
15 Jun 2023 by Maxim Kartavenkov
Discussion of simple ways of tracing and also new tracing technologies involved in Windows 10
5 Jun 2023 by Sarthak S
Assembly inspection and hacking with windbg
18 May 2023 by Maxim Kartavenkov
The series of articles covers most aspects of logging and tracing mechanisms which can be embedded into your application. It discusses simple ways of tracing and also new tracing technologies which were involved in Windows 10.
6 Apr 2023 by merano99
Quote: Uninitialised value was created by a stack allocation If I understand it correctly, you have the source code of a dynamic library ( shared libray) with the name ld-2.13.so. For this, someone has created an executable file, but the source...
6 Apr 2023 by saide_a
I have a library that works along the executable file that I don't have its source. when I use my library I get the segmentation fault error I have used valgrind to understand reason of fault but I couldn't understand it I think this happened because I can't make the executable by my self in...
31 Mar 2023 by Peter Huber SG
Near real time, multi threading safe tracing for any .NET technology
26 Jan 2023 by DrgIonuţ
I have updated Visual Studio 2019 from 16.6.1 version to 16.11.23 version. The update operation was finished successfully. When I want to run my MVC project in Debug mode, nothing happens. No error is displayed, the app is not running. What do I...
26 Jan 2023 by Graeme_Grant
You do know that the current version is VS2022 17.4.4? As for why it does not run, there is not enough information supplied. Try closing VS, then manually deleting the OBJ, BIN, and .VS folders. Restart and do a clean build. Check that you have...
20 Jan 2023 by Canned Bread
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DebugFixMethods { class Program { static void Main(string[] args) { (new...
20 Jan 2023 by OriginalGriff
Quote: cannot implicitly convert string to int This is not a "debuggable" problem: debugging is the process of finding and fixing problems that occur while your app is running - called runtime errors What it is is a syntax error and it is...
2 Dec 2022 by Деян Цонев
Hi, i am newly to c++ and debugging with gdb. I tryed to debug my program where the value of global variable gets empty in some part of the code . I compile the program with -g , then run gdb command and set the variable to be watched with watch...
27 Nov 2022 by reverser69
hi for some debugging puposes i need a debug build of new JDK so i can debug with .pdb files. i searched a lot and the only thing i could find was v1.8 which is very old. i also tried compiling the jdk but i only god errors. is there any link...
27 Nov 2022 by Dave Kreskowiak
Then you're going to have to build your own copy. You're going to have to read ALL OF THIS[^].
15 Nov 2022 by Member 15627495
Hello Helpers ! I'm facing a 'warning' when I compile, but I don't understand the messages in the debug box, see below : com\oleaut32\stdtypes\pictobj.cpp(3103)\ole32.dll!00007FFB26BE4EB6: (caller: 00007FFB26BE59D2) LogHr(1) tid(29f8) 8007029C...
15 Nov 2022 by OriginalGriff
Assertions are elements you added to your code to stop execution when an error is detected: Assert method (Visual Basic for Applications) | Microsoft Learn[^] If you are running under the debugger - and you should be, for testing - then the...
21 Oct 2022 by reverser69
for anyone who encounters my problem: i couldn't find Procyon command to resolve this issue so created a script to handle it. I know so little about batch script commands and I somehow put together this script with so many trial an errors; it...
21 Oct 2022 by reverser69
hi there is a complex program compiled in java. I'm tasked with finding a problem in this app. I monitored this app and I know where the problem is. i loaded the entire app's folder in IntelliJ. it decompiles the app just fine but only the...
21 Oct 2022 by Richard MacCutchan
Quote: how to pass a directory to procyon so it decompiles all jars in folder and its subfolders. You are more likely to get the answer from the person who wrote it: Java Decompiler · mstrobel/procyon Wiki · GitHub[^].
1 Jul 2022 by Michael Chourdakis
Try deep CPU features
27 Jun 2022 by Greg Utas
Keeping a program running when it would otherwise abort
18 Jun 2022 by coderlearner
#include #include using namespace std; class student { int id; float t1,t2,t3; char name[50]; public: student() { } student(int a,int b,int c) { t1=a; t2=b; t3=c; } student(student &t ) { t1=t.t1; t2=t.t2; t3=t.t3;...
18 Jun 2022 by Patrice T
Quote: Is my code complete according to the question Difficult to tell as there is no requirement in your question (v4). Quote: is this the output that the code should produce As there is no sample output in the question, it is difficult to...
18 Jun 2022 by Greg Utas
A few things, by no means a complete analysis of all your code. 1. When you edited your question, you deleted the description of what the code is supposed to do. 2. The default constructor should initialize all fields to default values. 3. char...
18 Jun 2022 by OriginalGriff
No. Read the question - the full version that you were given, rather than the abstract you threw at us - and you will see that it requires you to create three instances, and fill them with data. Testing your code is important - and it's part of...
10 Mar 2022 by Greg Utas
No breakpoints or drooling all over the console!
8 Mar 2022 by lukeer
Hi forum, atm, I'm able to 1) Use Visual Studio Code's debugger on my flask socket.io application and 2) serve clients that are not my development machine but not both at the same time. To use the debugger, I just hit "F5" from within VSCode....
8 Mar 2022 by lukeer
Got it. That __name__ == "__main__" check fails when debugging because Visual Studio Code doesn't start app.py directly but something called launcher instead. VSC also passes launcher some obscure arguments that tell it to start and debug...
6 Jan 2022 by Bernhard Nebel
Link-time optimization and debugging OO programs do not work very well together, at least on AVR MCUs.
27 Aug 2021 by Khiêm Nguyễn 2021
I created a user-defined literal like this in is OWN .cpp file (declared as a friend function in .h file): fraction operator"" _frac(const long double val) { return fraction(static_cast(val)); } But in main it...
27 Aug 2021 by Rick York
Do you have a prototype for the function defined? Something like : extern fraction operator _frac(const long double val);
21 May 2021 by Jarek Szczegielniak
In this article we use Visual Studio Code to edit and debug our increasingly complex code running inside a Docker container.
13 May 2021 by Patrice T
Another problem in your code MAX_NUMBER = 2 ** 32 - 1 # Finds the unit with minimum speed. # If there are more than 1 units then the first occured # For an empty list the function returns None def findSlowestUnit(units): slowestUnit = None; ...
13 May 2021 by Coolminion66
This is the output I get print(findSlowestUnit(200)) File "C:/Users/bhavika/Desktop/shonal/shonal/Demo level 3 script and ppts/Python/games/Basic_game/debug_code.py", line 8, in findSlowestUnit for currentUnit in units: TypeError: 'int' object is...
13 May 2021 by raddevus
==>> TypeError: 'int' object is not iterable – You are attempting for loop over the units object. for currentUnit in units Most likely the units object is not a collection and so it is failing.
7 May 2021 by Marcell Lipp
Git used for debugging
7 Feb 2021 by JacksonSteel
Can I use XMLHttpRequest and this chrome extension to fix the problem that can't execute the code in the secondary window with a different domain through the console of the first window in javascript? ...
7 Feb 2021 by Richard Deeming
Check out the reviews of that extension - it doesn't look particularly good. And as far as I can see, you are not issuing a cross-origin network requests, which is what would be blocked by CORS. Instead, you are trying to access the DOM of a...
13 Dec 2020 by Member 15019654
I have to write a game in graphics.h for school, that's why I use this old header, but that's not important now. The problem is that after I run this for about 10 seconds, it freezes. As in, stops working at all, and is only responsive to me...
13 Dec 2020 by Rick York
I would do two things : first, move the declaration of txt out of the loop. It does not need to be created in every iteration of the loop. Second, start commenting things off to see where the culprit is. Begin with something like this : int...
13 Dec 2020 by Richard MacCutchan
You appear to be trying to mix Windows graphical code with Console code. That will most likely cause problems. Either use only the features of the old DOS-style graphics library, or switch to proper Win32 and GDI or GDI+.
4 Dec 2020 by PachisiaVikas
Know the steps to quickly set up a secure remote debugging environment and boost your productivity
23 Sep 2020 by Member 14947073
Click the menue items 'View' -> 'Debug Pads' -> 'Call Stack'
22 Sep 2020 by saide_a
hi all My problem is following when I get signal number 6 , I expected to see call stack and found out in which function abort happened, But I don't get expected output What I have tried: all my runs with valgrind show callstack. but valgrind...
22 Sep 2020 by Richard MacCutchan
Try adding some of the Debugging Options (Using the GNU Compiler Collection (GCC))[^] so you can find more information when the abort happens.
4 Sep 2020 by DotNetSteve
Testing large systems built on stored procedures can quickly become unyielding. Here are some thoughts on managing the complexity which have been rolled into a simple to use program
8 Jul 2020 by Tasadit
Debugging a Xamarin.iOS app, and can't find the call stack in Visual Studio Mac. The documentation here says helpfully Quote: The debug configuration provides a helpful set of tools to support debugging, such as breakpoints, using data...
8 Jul 2020 by Tasadit
The call stack comes up automatically when you start debugging. I had somehow managed to close it, and I can't find how to make it come back. It remained closed through several debugging runs, also after closing the project and opening it again....
20 May 2020 by KarstenK
Solution 1 is correct but you may also write some specialized function with the TRACE macro to print interesting values. Sometimes some checking makes sense for only printing the special cases. Another option can be to create some sorted or...
20 May 2020 by dj4400
Hi, I am handling a large array of a certain struct and wish to see the values in the array I can see all the entries in the watch window but if i want to see the fields of each entry in the array i need to expand it manually. Is there a way to...
19 May 2020 by Dave Kreskowiak
No, there isn't. At least not by using the default visualizer. You may want to look into writing your own visualizer for an array type. But be warned. Creating a view of an entire array of expanded objects can take a LOT of time. Google: visual...
19 May 2020 by Marcell Lipp
A proof introduction to Git blame and Git bisect
30 Mar 2020 by Member 14787235
I am also the same problem, in my case php xampp server is blocking internally to IIS server. I stopped the xampp process in task manager, that solves my problem.
30 Mar 2020 by ashriv
I try to debug my web service with IIS7. It doesn't start and throws an error."Unable to start debugging on the web server. The remote debugging components are not registered or running on the web server. Ensure the proper version of msvsmon is running on the remote computer."my...
27 Feb 2020 by Lukasz Szyrmer
Story points defined, disclaimers and example provided
30 Jan 2020 by Stefan_Lang
VS dumps all unreleased memory blocks in the output window upon normally ending a program in debug mode. Other than that, the only suggestion I can make is using smart pointers in your code, rather than raw pointers.
30 Jan 2020 by oleg63
Old times I've used the BoundsChecker for C++ memory leaks detection. It was very good for 32 bit but never worked 100% under 64 bit, no newer API's support, so we dropped this tool. - Just wonder how nowdays the C++ developers cope with the memory leaks? Now I'm working with Visual Studio...
24 Jan 2020 by 10xlearner
Bug fixes and defensive programming
8 Jan 2020 by Stefan_Lang
The message already tells you pretty clearly the reason for this issue: Quote: Conditional jump or move depends on uninitialised value(s) and Quote: Uninitialised value was created by a stack allocation are quite hard not to understand. As to the location of the code responsible for this...
17 Oct 2019 by VipinMittal18
How to enable debugging in Twig templates - Drupal 8
14 Aug 2019 by DaveAuld
Object inspection with %O in the console output
21 Jul 2019 by Zon-cpp
Hi, my project is a clr (VC++) project. i want to debug and to trace my code ( in debug mode) but as soon as i call da->Fill(dS, L"tlbReferalPersonInfo"); then i can't see value of objects. for example in my code bellow (in debug mode) : int otherVal = 10; SqlCommand^ cmd = gcnew...
21 Jul 2019 by OriginalGriff
Fill is a "blocking call" - it doesn't return until the DB has assembled all information and returned it to your application (or the SQL timeout expires, whichever happens first). So if your stored procedure takes a long time, you can't do anything else on that thread - including use the...
10 Jun 2019 by Member 10995123
Hi, We have an Azure web service running, and when I try to connect remote debug to it via "Cloud Explorer" I get the following error: "Cloud Explorer - Action is not supported in your current Azure SDK version". If I try to connect via Debug-Attach to process:...
10 Jun 2019 by Member 14492252
I have similar issue although in my case I could not access files on webapp in Azure. Updating VS and azure development component didn't help. What has worked for me was to revert cloud explorer to previous version: - Launch VS in administrator mode - From Tools menu select Extensions and...
6 Jun 2019 by Gerry Schmitz
Do you know what your current "Azure SDK version #" is? Why do you keep ignoring that fact when it's saying that is the PROBLEM? It would seem the logical approach is to confirm what your version # is and what is available. You've spent "2 days" ignoring the obvious. Azure SDK for .NET...
21 Apr 2019 by Michael Haephrati
This article will show how to selectively add a Console window to Win32 or even MFC programs for debugging purposes.
4 Mar 2019 by Apriorit Inc, Artem K.
A clear overview on how you can establish communication between a device and its driver
1 Mar 2019 by Apriorit Inc, Sergii Kusii
15 Jan 2019 by Jeong, WonYoung(Brad)
refer to this site : Symbols for mixed-mode Python/C++ debugging - Visual Studio | Microsoft Docs[^]
15 Jan 2019 by Kulamani Sethi
I am debugging my project under visual studio 2013 c++ also configured all Microsoft symbol server. Getting error .../\SysWOW64\sysfer.dll'. Cannot find or open the PDB file....\...\20160125.011\UMEngx86.dll'. Cannot find or open the PDB file.Rest of my .pdb file for .dll loaded...
24 Oct 2018 by Mark Kruger
Visual Studio loader with arguments
10 Oct 2018 by Member 13932087
Currently, I have MxQ 4K Android TV Box which has Android Version 7.1(inside). I need to connect and debug this device with my android studio. I'm using the android studio in user account rather than administrator account. So my question is, 1) Is possible that, I'm using android studio in...
10 Oct 2018 by Richard MacCutchan
See Android Debug Bridge (adb)  |  Android Developers[^] for connecting over WiFi.
11 Sep 2018 by CHill60
The Microsoft Documentation has an article specifically on the order of events - Order of Events in Windows Forms | Microsoft Docs[^] EDIT after OP comment One way to track the order of events in controls or objects is to log them - you will need to use the IDE to generate the code stub for...
11 Sep 2018 by ahmed_sa
Problem How to know which events fires from start of windows form running like load then textchanged etc.... . I have some variables on load of form . these variables have override to it . but i dont know on which place or event fires after load this windows form is very big coding lines ...
29 Jun 2018 by Salman350
It is solved by the creater himself. I really dont know what he did. Thanks for your efforts.
29 Jun 2018 by Salman350
While I am trying to build my windows application, I am getting following error. The command "C:\repos\CommunityLive\CL_GateApp\signing\StrongNameUnsignedAssemblies.bat C:\repos\CommunityLive\CL_GateApp\signing\" exited with code 2. What I have tried: Following is my Pre-Build event...
20 Jun 2018 by Dave Kreskowiak
An error code (also exit code) of 2 means "File not found". So, somewhere in your batch file, a file was specified that doesn't exist and whatever command that tried to execute exited with that exit code. Since we know nothing about your batch file, it's impossible to tell you anything beyond...
19 Jun 2018 by KarstenK
In the bug report is a workaround (attaching the debugger) reported. As long as the bug isnt fixed, it isnt fixed. Some bugs are overlooked and not so important. Maybe it is an side effect of the virtual machine.
19 Jun 2018 by Member 13606974
I'm working on a project with curses.h, now when I'm encountring the line which has initscr() in debug mode (NetBeans 8.2) it gives me this error: unknown terminal I'm running the project on Ubuntu 18.04 virtual machine. also searched for the solution on the google but it seems there is no...