How to debug the source code after Qt 5.7

Download Qt source code and debugging information

Install Qt source code

When installing Qt components, check sourceto install.

After the installation is complete, you need to configure it in Qt Creator.

Click 工具—— 选项—— 调试器—— 概要—— in the menu bar in turn to add 添加Qt源码the Srcdirectory under the installed Qt path , such as C:\Qt\Qt5.12.6\5.12.6\Src.

Install debugger

Needs its own download Windows10 SDK installation and Qt Creator menu bar, select 工具- - 选项- Kits, Debuggersadded in Windows Kits subdirectory cdb.exepath.

Download debugging information (.pdb)

After Qt5.7, the pdb file is no longer placed in the same directory as the installer

Qt-Archive has no pdb file in this path.

Debugging under window needs to obtain pdb in the following directory

Qt-Debug-Info

There are many directories under this address, and Qt 5.12.6 can go to the qt5_5126/qt.qt5.5126.debug_info.win64_msvc2017_64/directory to download.

Qt debugging information web page directory

Download all .7z compressed packages from this path, and then unzip them to the Qt installation directory (for example C:\Qt\Qt5.12.6\5.12.6\msvc2017_64), and the .pdbdebugging information files will be stored in the binand qmlfolders respectively.

Qt debugging information compression package

Qt source code debugging

In the Qt code written by yourself, add breakpoints and use the debugger to debug.

Use shortcut keys F11to enter the corresponding Qt library function.

Note: You can enter the Qt source code only in the debug mode, and you cannot F2view the source code in the edit mode .

Guess you like

Origin blog.csdn.net/gkzscs/article/details/108666717