MSVC QT Creator - How to setup CDB correctly?
Asked Answered
C

2

6

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
Cyanotype answered 26/11, 2013 at 20:26 Comment(4)
I honestly don't know if this an issue or not, but you appear to have the compiler configured to produce a 32 bit program and the debugger configured to use the 64 bit cdb.Aplanatic
@Michael Burr the installer page msdn.microsoft.com/library/windows/hardware/… says it should work for both, I cannot find a 32 bit version.Cyanotype
Download page for Debugging Tools for Windows: msdn.microsoft.com/en-us/library/windows/hardware/… Make sure to restart Qt Creator after installing, then it auto-detects.Sills
possible duplicate of How to get Qt Creator to work with CDB?Chism
C
2

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.

Cyanotype answered 5/12, 2013 at 0:39 Comment(1)
Yes! Yes!! Yes!!! This works!! This totally works!!! =) =) =) Thank you man, for the wierd but a working solutions! All hail Rreeves!!Affettuoso
K
2

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"

Kiely answered 9/5, 2014 at 17:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.