Author Topic: Debugger not working  (Read 1865 times)

Offline Zorerks

  • Single posting newcomer
  • *
  • Posts: 1
Debugger not working
« on: April 16, 2025, 03:50:56 am »
Hello! I've been struggling with this issue for a whole afternoon, tried countless ways of fixing it and no luck. I even reinstalled Code::Blocks (I'm using the latest 25.03 version).
Over on the Debugger settings, the path to gbd.exe is correct, the compiler settings have the (-g) setting tickled off, there doesn't seem to be any " " (blank spaces) over the directory... I really have no idea. For a little context, I'm dealing with a .h and .c file, both serving as a static library for my main.c, but the debugger just isn't working anywhere. I don't know what to do. Here's the log it's been giving me:


Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: E:\Topicos\TestVector\
Adding source dir: E:\Topicos\TestVector\
Adding file: E:\Topicos\TestVector\bin\Debug\TestVector.exe
Changing directory to: E:/Topicos/TestVector/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;E:\bin;E:\;C:\Program Files\Eclipse Adoptium\jdk-11.0.20.101-hotspot\bin;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Windows Live\Shared;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn;C:\Program Files\Microsoft SQL Server\160\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\Users\Zorerks\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\Zorerks\AppData\Local\Programs\Python\Python39;C:\Users\Zorerks\AppData\Local\Microsoft\WindowsApps;C:\Users\Zorerks\AppData\Local\GitHubDesktop\bin;C:\Users\Zorerks\AppData\Local\Programs\Microsoft VS Code\bin

[debug]Command-line: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet  -args E:/Topicos/TestVector/bin/Debug/TestVector.exe
[debug]Working dir : E:\Topicos\TestVector

Starting debugger: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet  -args E:/Topicos/TestVector/bin/Debug/TestVector.exe
done

[debug]E:/Topicos/TestVector/bin/Debug/TestVector.exe: No such file or directory.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders, r3) 16.2
[debug]Copyright (C) 2024 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.
[debug]Type "show copying" and "show warranty" for details.
[debug]This GDB was configured as "x86_64-w64-mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<https://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]    <http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders, r3) 16.2

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set filename-display absolute
[debug]>>>>>>cb_gdb:
[debug]> set style enabled off
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory E:/Topicos/TestVector/
[debug]Source directories searched: E:/Topicos/TestVector;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "E:/Topicos/TestVector/main.c:11"
[debug]No symbol table is loaded.  Use the "file" command.
[debug]Breakpoint 2 ("E:/Topicos/TestVector/main.c:11") pending.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]No executable specified, use `target exec'.
[debug]Starting program: 
[debug]>>>>>>cb_gdb:

Starting the debuggee failed: No executable specified, use `target exec'.

[debug]> quit

Debugger finished with status 0



HELP!

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2859
Re: Debugger not working
« Reply #1 on: April 16, 2025, 07:18:08 am »
The debugger does not believe that "E:/Topicos/TestVector/bin/Debug/TestVector.exe" was ever created.

Code
debug]E:/Topicos/TestVector/bin/Debug/TestVector.exe: No such file or directory.

Check the location of the executable output file. Look at the compiles output location in the Build Log tab. It should look something like this: "Output file is ..<your output exe name> with size <size of the executable> MB"
« Last Edit: April 16, 2025, 07:24:14 am by Pecan »

Offline cacb

  • Lives here!
  • ****
  • Posts: 547
Re: Debugger not working
« Reply #2 on: April 16, 2025, 04:14:50 pm »
Hi, I do not know if this is your problem, but note that on Windows

Code
E:/Topicos/TestVector
is not the same as

Code
E:\Topicos\TestVector