0

I am using a 64bit Windows OS and Code blocks version 17.12. Whenever I try to debug my code, I get the following message and debug does not start.

Active debugger config: GDB/CDB debugger:Default  
Building to ensure sources are up-to-date  
Selecting target:  
Debug  
Adding source dir: C:\CX\will\  
Adding source dir: C:\CX\will\  
Adding file: C:\CX\will\bin\Debug\will.exe  
Changing directory to: C:/CX/will/.  
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\CodeBlocks\MinGW;C:\oraclexe\app\oracle\product\10.2.0\server\BIN;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby2.3.0\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\PuTTY;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\Java\jdk1.8.0_161\bin;C:\Users\Vinay A\AppData\Local\Microsoft\WindowsApps;C:\Users\Vinay A\AppData\Local\atom\bin;C:\Program Files\Java\jdk1.8.0_151\bin;C:\Users\Vinay A\AppData\Roaming\npm
Starting debugger: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet  -args C:/CX/will/bin/Debug/will.exe  
failed

I have set the path in environment variables as C:\Program Files (x86)\CodeBlocks\MinGW\bin

I have also set the produce debugging flag -g in CodeBlocks.

The code is part of a console application project. The executable path for the debugger is C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe

What am I missing here? Please help. Thanks in advance.

6
  • 2
    Does the debugger exist at the path specified (i.e., C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe)? Can you run the debugger via the cli? Commented Mar 19, 2018 at 18:48
  • 1
    Are you debugging C, C++ or mixed? The C and C++ are distinct languages. You should use g++ for C++ and gcc (Yes, I know that the compiler will process correctly based on file extension). Commented Mar 19, 2018 at 19:36
  • Does C:/CX/will/bin/Debug/will.exe exist? Commented Mar 19, 2018 at 20:34
  • Are you running the 32 bit debugger to debug a 64 bit application? Commented Mar 19, 2018 at 21:04
  • 1
    I uninstalled CodeBlocks version 17.12 and installed version 16.01. Now It's working. Commented Mar 20, 2018 at 14:53

2 Answers 2

2

go to Settings and then Debugger... and GDB/CDB debugger and press Reset defaults

enter image description here

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

Comments

0

Install older version of code blocks since there is issue with the debugger for Code blocks version 17.12.

Comments

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.