Author Topic: Debug failed  (Read 305 times)

Offline bdrmachine

  • Single posting newcomer
  • *
  • Posts: 2
Debug failed
« on: May 17, 2020, 03:47:55 am »
I gist started using Code Blocks and I don't know how to debug.  With a simple "C"  hello world console project on my win10 box, I tried to run debug by clicking on the red play arrow.  I get the following error:

"Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet  -args C:/My_Code_Blk/test11/bin/Debug/test11.exe
failed"

Any suggestions?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12625
    • Travis build status
Re: Debug failed
« Reply #1 on: May 17, 2020, 01:07:45 pm »
Enable full debugger log and post it.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline bdrmachine

  • Single posting newcomer
  • *
  • Posts: 2
Re: Debug failed
« Reply #2 on: May 17, 2020, 11:59:39 pm »
Not sure how to enable full debugging log but this is the full-text listing in debugger tab.

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\My_Code_Blk\test11\
Adding source dir: C:\My_Code_Blk\test11\
Adding file: C:\My_Code_Blk\test11\bin\Debug\test11.exe
Changing directory to: C:/My_Code_Blk/test11/.
Set variable: PATH=.;C:\MinGW\bin;C:\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;E:\Putty;E:\Microchip\bin;C:\Program Files (x86)\Common Files\Intuit\QBPOSSDKRuntime;C:\Program Files\Microchip\xc8\v2.20\bin;C:\Program Files\Microchip\xc16\v1.50\bin;C:\Users\bdrma\AppData\Local\Microsoft\WindowsApps;C:\Users\bdrma\AppData\Local\GitHubDesktop\bin;C:\SysGCC\raspberry\bin;C:\SysGCC\mingw64\bin;C:\Users\bdrma\AppData\Local\Programs\Microsoft VS Code\bin
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet  -args C:/My_Code_Blk/test11/bin/Debug/test11.exe
failed

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2730
Re: Debug failed
« Reply #3 on: May 18, 2020, 12:57:00 am »
You enable Full debug logging with
Settings->Debugger->Common->Full (Debug) log

Does the path " C:\MinGW\bin\gdb.exe" exists?
Does "C:/My_Code_Blk/test11/bin/Debug/test11.exe" exists?

Offline francoromano

  • Single posting newcomer
  • *
  • Posts: 2
Re: Debug failed
« Reply #4 on: May 22, 2020, 11:54:40 pm »
The first time I started Codeblock I got the message "starting debug ... failed".
In the menu
"Settings
Debugger ...
Default ":
the field
executable path was empty.

I solved it by entering the correct path of gdb.exe. In my case C: \ Program Files \ CodeBlocks \ MinGW \ bin \ gdb.exe
Now debugging starts correctly