Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSVC QT Creator - How to setup CDB correctly?

So I re installed my system and I am having huge problems with the MSVC debbugging. I can compile my application no problem. I have followed the instructions for QT creator setting up debugging with CDB on Windows 7.

  1. I installed MS Visual Studio 2010 and updates
  2. I uninstalled 2010 C++ runtimes.
  3. I installed the Windows debugging tools and SDK.
  4. I also re-updated 2010 runtimes.

After all this I now have the CDB debugger.

C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe

In QT it auto detects the cdb.exe, this is what my kit looks like.

QT Settings

When trying to run a debug session it simply starts and quits.

Debugging starts
Debugging has finished
like image 970
rreeves Avatar asked Oct 02 '22 07:10

rreeves


2 Answers

The anwser is kind of silly, when you install QT creator you need to create at least one project first without anything setup. If you import a project without doing this first everything will fail. So the exact steps I took to get this to work are....

1) I installed VS 2010

2) Update VS 2010 to SP1

3) Update Windows and .NET

4) uninstall 2010 C++ redistributables 1.4 or newer

5) install Windows debugging tools and SDK for Windows 7

6) install QT libs

7) install QT creator

8) create C++ code snippet project

9) setup Compiler and Debbuger with CDB 64 bit

The 64 Bit CDB works in 32 bit mode as well.

like image 174
rreeves Avatar answered Oct 05 '22 22:10

rreeves


I was having a similar problem, it turns out it was not set to the x64 version. So basically: Tools->Options->Kits->Qt 5.x.x->Debugger and set it to the one ending with "x64\cdb.exe"

like image 23
ennetws Avatar answered Oct 06 '22 00:10

ennetws