1

Trying to run QT on Win7. Works pretty well but need debugger for C++ parts.

Read in forums that QT comes with preinstalled debugger except for Windows where you have to install M$ CDB. Which means I have to download Microsofts SDK and install the debugger part which apparently means I get the complete set of 6 alternate debugging environments: CDB, NTSD, NTKD, KD, WinDbg and an integrated debugger in Visual Studio. Seems a bit much but ok great.

Tried to install it but got error message "Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information." for which several forums say it helps if I uninstall any "Visual C++ Redistributable".

But I have no less than 11 versions of "Visual C++ Redistributable" installed (64 bit systems like mine tend to have twice as many as 32 bit systems). And the info from M$ and others is clear: Never uninstall these, they are designed to coexist, if I uninstall all 11, I can expect 11 of my other applications to crash. Don't want that.

I have two ideas:

  • Is there no alternative to CDB, and the installation package? I'm there's guessing probably no alternative to this debugger, but perhaps some other way to install CDB (I only need CDB, not all 6 debuggers).

  • My PC has Visual Studio 2012, both Ultimate and Express. I'm surprised if that doesn't mean CDB was installed as part of the package. If so, how can I make QT see it? I read somewhere that if I have Visual Studio plus WDK 8 then I will have the debuggers, but how can I check if I have WDK? I do have the folder "C:\Program Files (x86)\Windows Kits\8.0" with a lot of subfolders, that to me indicates that I have the WDK. And then I should already have CDB?

This thread seems to be very detailed on setting up CDB for QT, although a bit old (the instructions don't exactly match the latest i/f). If I already have CDB installed, it seems this thread should be enough to swlect and activate CDB. Well it's not. There are a lot of settings and no help. And I dont even know if I have CDB already or not. I have an auto detected kit "Desktop Qt 5.2.1 MSVC2012 32bit". But what about all the settings in QT debugger tabs general and CDB, shouldn't I at least enter a path or something?

DavidBanner
  • 91
  • 1
  • 4
  • Debugger path is set in the kit properties. Alternatively, you can use GDB with MinGW compiler and MinGW-based Qt builds. – Pavel Strakhov Feb 13 '14 at 23:52
  • Qt based on Mingw comes with GDB supplied as debugger. If you are using Qt based on MSVC, you already have MSVC and the MSVC supplied Compiler installed. Should work out of the box! For *remote* debugging you will need cdb plus the extension provided by Qt on the remote machine. – Sebastian Lange Feb 14 '14 at 06:45
  • I have "Qt 5.2.1 for Windows 32-bit (VS 2012, 541 MB)". If I choose "Start debugging" it says "No debugger set up". But how does QT know where the CDB is, shouldn't CDB's path be part of the settings? The debuger settings tabs General and CDB look rather blank. – DavidBanner Feb 14 '14 at 16:47
  • I suppose an option is to install "Qt 5.2.1 for Windows 32-bit (MinGW 4.8, OpenGL, 634 MB)". Could I have both QTs installed? I already mentioned what it says in "Build&Run / Kits" but that is auto detected, should I add something manually? Thanks for the help so far. Don't know why it doesn't work out of the box for me, perhaps QT gets confused by my having both VS Express and Ultimate or something.. – DavidBanner Feb 14 '14 at 16:54
  • I saw now in settings for Build&Run that it has a tab "Debuggers" with auto detected = none. And if I in tab Kits press Add, the dropdown menu for Debuggers says only "None". To me this indicates QT has not detected that CDB is there. – DavidBanner Feb 14 '14 at 17:05
  • I searched the entire hard disk for "CDB.exe", I don't have it. This thred indicates the name is CDB.exe: http://stackoverflow.com/questions/9975949/how-to-configure-cdb-in-qt-creator. Looking in C:\Program Files (x86)\Windows Kits\8.0\Debuggers, the only content is a folder x64 with 3 DLLs in it. My Windows is x64 but QT is 32bit. Sounds like I'm missing all 32bit debuggers (if not all debuggers, since I have no exe, only dbghelp.dll, srcsrv.dll and symsrv.dll). My VS installs are 32b though (but QT seems to have installed VS 11 both 64b and 32b). – DavidBanner Feb 14 '14 at 17:14

1 Answers1

1

I decided to uninstall QT (with VS) and then install the other QT (with MinGW), and now debugging seems to work: I get no error messages, I can set a breakpoint, start debugging. And I finally found out that global and static variables don't show in the right window until I add them manually. So it seems ok now.

DavidBanner
  • 91
  • 1
  • 4
  • I had the exact same issue with Qt and the exact same error message when I tried to install the "Debugging Tools for Windows". Thanks - your solution worked. – Dale Moore Feb 01 '15 at 21:19