3

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.

5
  • In your Settings -> Debugger settings -> GDB/CDB debugger -> Default -> Executable path, what does it say? Commented Feb 24, 2016 at 15:27
  • its empty.. coming as red blank field Commented Feb 24, 2016 at 17:00
  • Please let me suggest this post. With regards and friendship. Commented Apr 5, 2019 at 9:40
  • Please let me suggest this post. With regards and friendship Commented Apr 5, 2019 at 9:41
  • Please let me suggest this post. With regards and friendship Commented Apr 5, 2019 at 9:43

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I could not find the path where gdb.exe was located so I installed other version of code blocks, in that executable path contains the gdb.exe in the field and now its working fine. Thanks Mike :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.