QT---cdb (Microsoft Console Debugger) debugging

Source: Internet
Author: User
Tags gdb debugger

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, selectInsert
    • 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.