User forums > Help

Debugger doesn't work

(1/4) > >>

pocoloco:
When I try to run the debugger I get this error:

--- Code: ---Starting the debuggee failed: No executable specified, use `target exec'
--- End code ---

I have been struggling with this for hours now.

I have removed any spaces from my project name.
I have tried downloading a different mingw version from here: https://sourceforge.net/projects/mingw-w64/files/mingw-w64/

I have the codeblocks-20.03mingw-setup.exe version installed.
I have Windows 10 64bit.

This is the log I get:


--- Code: ---Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\as\asdf\
Adding source dir: C:\as\asdf\
Adding file: C:\as\asdf\bin\Debug\asdf.exe
Changing directory to: C:/as/asdf/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python27;C:\Python27\Scripts;C:\Program Files\Python39\Scripts;C:\Program Files\Python39;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:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files (x86)\GitExtensions;C:\Program Files (x86)\Microsoft VS Code\bin;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 (x86)\PuTTY;C:\Program Files (x86)\nodejs;C:\Program Files (x86)\Bitvise SSH Client;C:\Users\Pouria\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Nmap;D:\Program Files\_bin\UnixUtils;D:\Program Files\_bin;D:\Program Files\_bin\aliases;C:\Users\Pouria\AppData\Local\Programs\Fiddler;C:\Users\Pouria\AppData\Roaming\npm;D:\Program Files\hashcat-6.1.1;D:\Program Files\ffmpeg-4.3.1-win32-shared\bin;D:\Program Files\ImageMagick-7.0.10;D:\wamp\bin\php\php7.2.4;D:\Personal Folder\Pouria\My Documents\_0NirLauncher\SysInternals;D:\Program Files\Arduino-cli;C:\Program Files (x86)\GnuWin32\bin
Starting debugger: C:\mingw64\bin\gdb.exe -nx -fullname -quiet  -args C:/as/asdf/bin/Debug/asdf.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 8.1
Starting the debuggee failed: No executable specified, use `target exec'.
Debugger finished with status 0


--- End code ---

BlueHazzard:
Can you share your project file?
Is C:\as\asdf\bin\Debug\asdf.exe present?
Have you changed something in the project settings?

pocoloco:

--- Quote from: BlueHazzard on May 11, 2022, 10:32:13 pm ---Can you share your project file?
Is C:\as\asdf\bin\Debug\asdf.exe present?
Have you changed something in the project settings?

--- End quote ---

Just to be safe I created a new project with just the sample "Hello world" code.

Here is the project file

--- Code: ---<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="sample" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/sample" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/sample" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
<Unit filename="main.cpp" />
<Extensions>
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>

--- End code ---

- Yes the file "C:\sample\bin\Debug\sample.exe" exists

- I have not changed anything in the project settings. It's the default new project.

The log when I click debug:

--- Code: ---Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\sample\
Adding source dir: C:\sample\
Adding file: C:\sample\bin\Debug\sample.exe
Changing directory to: C:/sample/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python27;C:\Python27\Scripts;C:\Program Files\Python39\Scripts;C:\Program Files\Python39;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:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files (x86)\GitExtensions;C:\Program Files (x86)\Microsoft VS Code\bin;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 (x86)\PuTTY;C:\Program Files (x86)\nodejs;C:\Program Files (x86)\Bitvise SSH Client;C:\Users\Pouria\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Nmap;D:\Program Files\_bin\UnixUtils;D:\Program Files\_bin;D:\Program Files\_bin\aliases;C:\Users\Pouria\AppData\Local\Programs\Fiddler;C:\Users\Pouria\AppData\Roaming\npm;D:\Program Files\hashcat-6.1.1;D:\Program Files\ffmpeg-4.3.1-win32-shared\bin;D:\Program Files\ImageMagick-7.0.10;D:\wamp\bin\php\php7.2.4;D:\Personal Folder\Pouria\My Documents\_0NirLauncher\SysInternals;D:\Program Files\Arduino-cli;C:\Program Files (x86)\GnuWin32\bin
Starting debugger: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet  -args C:/sample/bin/Debug/sample.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 8.1
Starting the debuggee failed: No executable specified, use `target exec'.
Debugger finished with status 0

--- End code ---

pocoloco:
I just installed the 32-bit version and I get the same error.

BlueHazzard:
Can you enable full debug logging in "Settings->Debugger->Common->full debug log" and post the debug log again here?

ps. thank you for posting the log from the beginning :)

[edit:] Also, have you seen this: https://stackoverflow.com/questions/67045842/how-do-you-debug-using-codeblocks-20-03-the-mingw-version ?

Navigation

[0] Message Index

[#] Next page

Go to full version