Supported Debuggers
Main debugger under Windows system:
- CDB, can only debug the user program, only the console interface, to work in the command line form
- NTSD, can only debug the user program, only the console interface, to work in the command line form
- KD, mainly used for kernel debugging, sometimes also for user-state debugging, only console interface, to work in the command line form
- WINDBG, the user-state, the kernel can play the debugging function, the use of a visual user interface
Platform |
Compiler |
Native Debugger |
Linux |
Gcc/icc |
GDB, LLDB (experimental) |
Unix |
Gcc/icc |
Gdb |
MacOS |
Gcc/clang |
LLDB,FSF GDB (experimental) |
Windows/mingw |
Gcc |
Gdb |
Windows/msvc |
Microsoft Visual C + + Compiler |
Debugging Tools for WINDOWS/CDB |
In the official QT documentation, the compilers supported by Qtcreator on each platform and the corresponding debuggers are indicated. The GDB debugger is supported in the MinGW version of Qtcreator on the Windows platform. The msvc version of the qtcreator default is no debugger, you need to install and set up a good debugger (CDB).
Download and install
: https://msdn.microsoft.com/zh-cn/library/windows/hardware/ff551063
Installation is divided into online installation and offline installation, offline installation can first choose to download the installation package, and then install. Standalone installation is only available Debugging Tools for Windows
.
Configuring CDB in Qtcreator
Mode one: Manual configuration
- Open
Tools
> Options
> Debugger
>CDB Paths
- In the Symbol Paths panel, select
Insert
- Select the directory where you are want to store the cached information. Use a subfolder in a temporary directory, such as
C:\temp\symbolcache
.
- Select
OK
.
Mode two: Restart Qtcreator, auto-detect, then manually select the debugger
Commissioning Practice
Can clearly see the variable value changes, can be single-step debugging, break point and so on.
Extended
QT Memory leak check:
- Linux, Mac OS x:valgrind
- Windows:visual Leak Detector for Visual C + + 2008-2015 (VLD, Open-source)
Reference
Https://wiki.qt.io/Profiling_and_Memory_Checking_Tools
Http://www.voidcn.com/blog/u011012932/article/p-6231451.html
https://msdn.microsoft.com/zh-cn/library/windows/hardware/hh406277
Https://doc.qt.io/qtcreator/creator-debugger-engines.html
http://blog.csdn.net/FreeApe/article/details/52976704
QT---cdb (Microsoft Console Debugger) debugging