【问题标题】:Code blocks Debugger failing to start代码块调试器无法启动
【发布时间】:2018-08-28 10:30:44
【问题描述】:

我使用的是 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

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

【问题讨论】:

  • 调试器是否存在于指定的路径(即C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe)?可以通过cli运行调试器吗?
  • 您是在调试 C、C++ 还是混合? C 和 C++ 是不同的语言。对于 C++,您应该使用 g++gcc(是的,我知道编译器会根据文件扩展名正确处理)。
  • C:/CX/will/bin/Debug/will.exe 存在吗?
  • 您是否正在运行 32 位调试器来调试 64 位应用程序?
  • 我卸载了 CodeBlocks 17.12 版并安装了 16.01 版。现在它正在工作。

标签: c++ c windows codeblocks


【解决方案1】:

转到Settings,然后转到Debugger...GDB/CDB debugger 然后按Reset defaults

【讨论】:

    【解决方案2】:

    安装旧版本的代码块,因为代码块版本 17.12 的调试器存在问题。

    【讨论】:

      猜你喜欢
      • 2023-01-30
      • 2017-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      • 2020-05-13
      相关资源
      最近更新 更多