[codeblocks] How do you specify a debugger program in Code::Blocks 12.11?

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

The answer is


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.


  1. Go to settings >> Debugger.
  2. Now as you can see in the image below. There's a tree. Common->GDB/CDB Debugger -> Default. enter image description here

  3. Click on executable path (on the right) to find the address to gdb32.exe .

  4. Click gdb32.exe >> OK.

THATS IT!! This worked for me.


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).


  1. Go to Settings -> Debugger -> Common -> GDB/CDB Debugger -> Default
  2. Click on executable path to find the address to gdb32.exe
  3. Locate where your codeblock is installed
  4. Follow the given path:

CodeBlock -> MinGW -> bin -> gdb32.exe (locate it and double click on it)

  1. Press OK

  1. Click on settings in top tool bar;

  2. Click on debugger;

  3. In tree, highlight "gdb/cdb debugger" by clicking it

  4. Click "create configuration"

  5. Add "gdb.exe" (no quotes) as a configuration

  6. Delete default configuration

  7. 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.

  8. 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.

  1. Visit http://wiki.codeblocks.org/index.php?title=MinGW_installation#TDM-GCC

  2. Follow installation's instructions.

  3. Alternatively I suggest this post.

Regards.