how add a debug to a kit in QT for msvc2013

2019-09-11 06:11发布

问题:

I just made a clean instalation of Qt5.5 with QtCreator and Visual Studio 2013 Express for desktop (C++). However there is no Auto dettected Debug option on the default kit.

Is that a normal behaviour ?

How can I debug my msvc2013 Qt application? Should I mannualy add a new debbuger?

Here is screenshots of my Qt.

回答1:

You have to have an appropriate Windows SDK installed as SDK 8.1 in my case:

It expects to find CDB.exe matching the bitness of your project 32/64 bit. And in case if it is still not found, find it manually on your PC local hard drive.



回答2:

Qt privides a guide on how to set up a debugger. I had the same problem as you and followed the guide. Look at the section "Installing Native Debuggers", it provides you a link to the download page of the debug tools for Windows.

On that Microsoft page, chose the version of WDK that suits you (for me it was WDK 8.1 Update (for Windows 8.1, 8, and 7 drivers)). Download and install the WDK on your machine.

After the installation is done, go the Qt's "Manage Kits" to the "Debuggers" section. Add the path of the debugger that you just installed. Mine has a path C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64\cdb.exe. I assume yours will be similar. Add the debugger to the "Kit" configuration you are using. Now your debugger should work.