Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code blocks debugging issue

Tags:

c

codeblocks

I am trying to run a simple linked list program in code blocks, but I am not able to run the program and i getting the below error :

Active debugger config: GDB/CDB debugger:
Default Building to ensure sources are up-to-date 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))

I tried some of the posts given here on Stack Overflow, but that setting is already there in the code blocks.

like image 325
user905 Avatar asked Dec 08 '25 06:12

user905


1 Answers

Find out where gdb.exe is located in whatever GCC toolchain you are using with Code::Blocks, e.g:-

  • For MinGW: C:\MingGW\bin\gdb.exe,
  • For mingw-w64: C:\mingw-w64\x86_64-5.2.0-posix-seh-rt_v4-rev0\mingw64\bin\gdb.exe
  • For TDM-GCC: C:\TDM-GCC-64\bin\gdb.exe

If you can't find it then the root of the problem is that the debugger is (no longer) installed.

If you find it, then enter its full pathname in Settings -> Debugger settings -> GDB/CDB debugger -> Default -> Executable path. Code::Blocks will check the pathname you enter and if it can't find it then the edit-field will turn red. Otherwise, OK out and the debugger will then work.

If the directory containing gdb.exe is in your PATH then you can simply enter gdb.exe in the field.

like image 107
Mike Kinghan Avatar answered Dec 09 '25 21:12

Mike Kinghan