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选项进行勾选,如下图:

CodeBlocks17.12版本无法进行单步调试的相关原因及可能的而解决办法_第1张图片

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

CodeBlocks17.12版本无法进行单步调试的相关原因及可能的而解决办法_第2张图片

 CodeBlocks17.12版本无法进行单步调试的相关原因及可能的而解决办法_第3张图片

你可能感兴趣的:(Problem,Be,Solved)