I am trying to step through my program and I get the following message from Code::Blocks
Selecting target:
Debug
ERROR: You need to specify a debugger program in the debuggers's settings.
(For MinGW compilers, it's 'gdb.exe' (without the quotes))
(For MSVC compilers, it's 'cdb.exe' (without the quotes))
Unfortunately, I cannot figure out where I would type in gdb.exe.
This question is related to
codeblocks
Here is the tutorial to install GBD.
Usually GNU Debugger might not be in your computer, so you would install it first. The installation steps are basic "configure", "make", and "make install".
Once installed, try which gdb
in terminal, to find the executable path of GDB.
Download codeblocks-13.12mingw-setup.exe instead of codeblocks-13.12setup.exe from the official site. Here 13.12 is the latest version so far.
Click on settings in top tool bar;
Click on debugger;
In tree, highlight "gdb/cdb debugger" by clicking it
Click "create configuration"
Click default configuration, a dialogue will appear to the right for "executable path" with a button to the right.
Click on that button and it will bring up the file that codeblocks is installed in. Just keep clicking until you create the path to the gdb.exe (it sort of finds itself).
executable path
to find the address to gdb32.exe
CodeBlock -> MinGW -> bin -> gdb32.exe (locate it and double click on it)
Click on settings in top tool bar;
Click on debugger;
In tree, highlight "gdb/cdb debugger" by clicking it
Click "create configuration"
Add "gdb.exe" (no quotes) as a configuration
Delete default configuration
Click on gdb.exe
that you created in the tree (it should be the only one) and a dialogue will appear to the right for "executable path" with a button to the right.
Click on that button and it will bring up the file that codeblocks is installed in. Just keep clicking until you create the path to the gdb.exe
(it sort of finds itself).
For Code::Blocks 17.12.
Visit http://wiki.codeblocks.org/index.php?title=MinGW_installation#TDM-GCC
Follow installation's instructions.
Alternatively I suggest this post.
Regards.
Source: Stackoverflow.com