c++ - 代码阻止调试器无法启动

标签 c++ c windows codeblocks

我使用的是 64 位 Windows 操作系统和代码块版本 17.12。 每当我尝试调试代码时,都会收到以下消息,并且调试无法启动。

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

我已将环境变量中的路径设置为C:\Program Files (x86)\CodeBlocks\MinGW\bin

我还在 CodeBlocks 中设置了生成调试标志 -g

该代码是控制台应用程序项目的一部分。 调试器的可执行路径为C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe

我在这里缺少什么? 请帮忙。 提前致谢。

最佳答案

转到设置,然后调试器...GDB/CDB调试器 然后按重置默认值

enter image description here

关于c++ - 代码阻止调试器无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49370164/

相关文章:

C 编程 - 关于花括号的困惑

c - 如果更喜欢使用 -ffast-math,则 double 的良好标记值

windows - Msbuild 通过 VS 和命令行工作,但通过 Jenkins 失败

c - `.eh_frame' 和 collect2.exe : error: ld returned 1 exit status when compiling with MinGW 中的错误重定位地址

c++ - 将 kdtree 写入/读取到文件中

c++ - Wt WText 滚动条

c - feof 检测错误的文件结尾

windows - 如何嗅探本地流量

c++ - 清理双向迭代器代码

c++ - C++ 中具有常量的数组的指针和引用