我的代码块13.12包含borland 5.5和mingw调试器。每次我调试时,它都会完全调试它,而不会在断点或光标处停止(当按下run to cursor时)。调试日志是:
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: G:\Copy_string\
Adding source dir: G:\Copy_string\
Adding file: G:\Copy_string\bin\Debug\Copy_string.exe
Changing directory to: G:/Copy_string/.
Set variable: PATH=.;C:\Borland\BCC55\Bin;C:\Borland\BCC55;C:\Program Files\Intel\iCLS
Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\
WindowsPowerShell\v1.0;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Program
Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management
Engine Components\IPT
[debug]Command-line: C:\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args
G:/Copy_string/bin/Debug/Copy_string.exe
[debug]Working dir : G:\Copy_string
Starting debugger: C:\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args
G:/Copy_string/bin/Debug/Copy_string.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]Reading symbols from G:\Copy_string\bin\Debug\Copy_string.exe...(no debugging symbols found)...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
Reading symbols from G:\Copy_string\bin\Debug\Copy_string.exe...(no debugging symbols found)...done.
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 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 "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.5
[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 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> set follow-fork-mode child
[debug]>>>>>>cb_gdb:
[debug]> directory G:/Copy_string/
[debug]Source directories searched: G:/Copy_string;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: G:\Copy_string\bin\Debug\Copy_string.exe
Child process PID: 3596
[debug][New Thread 3596.0x4e4]
[debug][Inferior 1 (process 3596) exited with code 020325214]
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 3596) exited with code 020325214]
[debug]> quit
Debugger finished with status 0
`
答案 0 :(得分:0)
确保&#39;构建 - &gt;选择目标&#39;是[X]调试。然后打开要调试的源程序,并单击要停止调试器的行。
最后,使用[右键单击] + [运行到光标]。除源代码窗口中的行号外,还应显示黄色箭头。