How do I use the MinGW gdb debugger to debug a C++ program in Windows?
The first step is to compile your program with -g to include debugging information within the executable: g++ -g -o myprog.exe mycode.cpp Then the program can be loaded into gdb: gdb myprog.exe A few commands to get you started: break main will cause the debugger to break when main is called. You can also break … Read more