Code::Blocks 调试器无法启动(劣质 1 正常退出)

Code::Blocks debugger won't start (Inferior 1 exited normally)

所以我无法让 Code::Blocks 开始调试我的程序。这实际上发生在以前,但我可以通过删除项目目录名称中的空白 space 和特殊字符来修复它。但是由于某种我不知道的原因,现在即使目录名正确我也无法开始调试我的程序。我试过在编译器设置中启用 -g 而不是 -s。

这是调试器的完整日志。

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target: 
Debug
Adding source dir: D:\semester3\Strukdat\project\tugasindividu_soal1\lol\
Adding source dir: D:\semester3\Strukdat\project\tugasindividu_soal1\lol\
Adding file: D:\semester3\Strukdat\project\tugasindividu_soal1\lol\bin\Debug\lol.exe
Changing directory to: D:/semester3/Strukdat/project/tugasindividu_soal1/lol/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Rtools\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;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:\FPC.0.4\bin\i386-Win32;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Users\fairuz\AppData\Local\Microsoft\WindowsApps;C:\Users\fairuz\AppData\Roaming\TinyTeX\bin\win32

[debug]Command-line: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args D:/semester3/Strukdat/project/tugasindividu_soal1/lol/bin/Debug/lol.exe
[debug]Working dir : D:\semester3\Strukdat\project\tugasindividu_soal1\lol

Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args D:/semester3/Strukdat/project/tugasindividu_soal1/lol/bin/Debug/lol.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]Reading symbols from D:/semester3/Strukdat/project/tugasindividu_soal1/lol/bin/Debug/lol.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 8.1
[debug]Copyright (C) 2018 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.  Type "show copying"
[debug]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]<http://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) 8.1

[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 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 D:/semester3/Strukdat/project/tugasindividu_soal1/lol/
[debug]Source directories searched: D:/semester3/Strukdat/project/tugasindividu_soal1/lol;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "D:/semester3/Strukdat/Fromfrends/2_createHuffTree&huffCode/huffTree&Code.c:54"
[debug]No source file named D:/semester3/Strukdat/Fromfrends/2_createHuffTree&huffCode/huffTree&Code.c.
[debug]Breakpoint 2 ("D:/semester3/Strukdat/Fromfrends/2_createHuffTree&huffCode/huffTree&Code.c:54") pending.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: D:\semester3\Strukdat\project\tugasindividu_soal1\lol\bin\Debug\lol.exe 

Child process PID: 24828

[debug][New Thread 24828.0x9bc]
[debug][New Thread 24828.0x586c]
[debug][Thread 24828.0x586c exited with code 0]
[debug][Inferior 1 (process 24828) exited normally]
[debug]>>>>>>cb_gdb:

[Inferior 1 (process 24828) exited normally]

[debug]> quit

Debugger finished with status 0

谁能看出我做错了什么?

我想一定是因为

[debug]No source file named D:/semester3/Strukdat/Fromfrends/2_createHuffTree&huffCode/huffTree&Code.c.

但我不知道如何处理这些信息。

Can anyone spot what i did wrong?

根据 Code::Blocks documentation 项目中的文件或文件夹名称中不应包含特殊字符:

Breakpoints could not work if the path/folder you've placed your project contains spaces or other special characters. To be safe use English letters, digits and '_'.

文件 D:/semester3/Strukdat/Fromfrends/2_createHuffTree&huffCode/huffTree&Code.c 的路径中有 2 & 个字符。我建议删除它们或替换为 _.