4
votes

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
2
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. - Michael Burr
@Michael Burr the installer page msdn.microsoft.com/library/windows/hardware/… says it should work for both, I cannot find a 32 bit version. - rreeves
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. - Grault

2 Answers

2
votes

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.

2
votes

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"