CodeBlocks17.12版本无法进行单步调试的相关原因及可能的解决办法

CodeBlocks17.12版本无法进行单步调试,报出如下错误:

 

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target: 
Debug
Adding source dir: E:\CodeBook\IB-LBM-RIGID_CYLINDER\
Adding source dir: E:\CodeBook\IB-LBM-RIGID_CYLINDER\
Adding file: E:\CodeBook\IB-LBM-RIGID_CYLINDER\bin\Debug\IB-LBM-RIGID_CYLINDER.exe
Changing directory to: E:/CodeBook/IB-LBM-RIGID_CYLINDER/.
Set variable: PATH=.;D:\Program Files (x86)\CodeBlocks\MinGW\bin;D:\Program Files (x86)\CodeBlocks\MinGW;D:\Program Files\Tecplot\Tecplot Chorus 2018 R1\bin;D:\Program Files\Tecplot\Tecplot 360 EX 2018 R1\bin;C:\Program Files\Microsoft MPI\Bin;D:\Programs\Python\Python37-32\Scripts;D:\Programs\Python\Python37-32;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp;\;.;D:\Java1.8\bin;D:\Java1.8\jre\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\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:\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\dotnet;D:\Program Files\nodejs;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\刘茫\AppData\Local\Microsoft\WindowsApps;C:\Users\刘茫\AppData\Roaming\npm;D:\Program Files (x86)\Graphviz2.38\bin;D:\MySQL\MySQL Server 8.0\bin
Starting debugger: D:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet  -args E:/CodeBook/IB-LBM-RIGID_CYLINDER/bin/Debug/IB-LBM-RIGID_CYLINDER.exe
done
Debugger finished with status 1
Selecting target: 
Debug
Adding source dir: E:\CodeBook\IB-LBM-RIGID_CYLINDER\
Adding source dir: E:\CodeBook\IB-LBM-RIGID_CYLINDER\
Adding file: E:\CodeBook\IB-LBM-RIGID_CYLINDER\bin\Debug\IB-LBM-RIGID_CYLINDER.exe
Changing directory to: E:/CodeBook/IB-LBM-RIGID_CYLINDER/.
Set variable: PATH=.;D:\Program Files (x86)\CodeBlocks\MinGW\bin;D:\Program Files (x86)\CodeBlocks\MinGW;D:\Program Files\Tecplot\Tecplot Chorus 2018 R1\bin;D:\Program Files\Tecplot\Tecplot 360 EX 2018 R1\bin;C:\Program Files\Microsoft MPI\Bin;D:\Programs\Python\Python37-32\Scripts;D:\Programs\Python\Python37-32;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp;\;.;D:\Java1.8\bin;D:\Java1.8\jre\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\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:\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\dotnet;D:\Program Files\nodejs;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\刘茫\AppData\Local\Microsoft\WindowsApps;C:\Users\刘茫\AppData\Roaming\npm;D:\Program Files (x86)\Graphviz2.38\bin;D:\MySQL\MySQL Server 8.0\bin
Starting debugger: D:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet  -args E:/CodeBook/IB-LBM-RIGID_CYLINDER/bin/Debug/IB-LBM-RIGID_CYLINDER.exe
done
Debugger finished with status 1

相关原因及解决办法: 

1:单步调试时,一定是要打开整个工程文件,而不是仅仅打开cpp文件。

2:工程文件的保存路径一定是全英文的,应该也不能带空格,最好不要带空格。

3:进行相关设置:选择setting——>compiler——>Global Compiler settings——>Compiler Flags,其中Produce debugging symbols选项进行勾选,如下图:

 4:进行相关设置:Settings——>Debugger——>Default——>Executable path进行文件路径的选择,这里有三个相关文件进行选择;gdb.exe,gdb32.exe,gdb64.exe。(如果没有这三个文件,可以去网上下载相关的exe文件)这里最好三个都试一遍,我的电脑是64位的,但是最后选择了gdb32.exe才成功。图片:

 

评论 42
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值