43

The question here is the same as mine but the solution there is not working for me. I am using QtCreator 2.4.1 on Windows 7. When I try to debug a simple hello world app the message displayed is: "The preferred debugger engine for debugging binaries of type 'x86-windows-msvc2010-pe-32bit' is not available....Details: There is no CDB binary available for binaries in format 'x86-windows-msvc2010-pe-32bit"

When I found that cdb.exe was not on my system I had Windows SDK installed with debugger tools and the current location of cdb.exe is "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\cdb.exe" and "C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x64\cdb.exe",

In the CDB tab I configured symbol server as well as the path of CDB.exe, but in vain!

QtCreator->Tools->options->Debugger->CDB Tab->has the following fields:
Additional arguments
use CDB console
Symbol Paths
Source Paths
Correct breakpoint location etc...

Can somebody kindly explain in detail what these mean and what values are expected here. Has anybody successfully debugged any applicaiton using Qt Creator.


Please refer this link:
http://qt-project.org/forums/viewthread/16018/

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Martin
  • 3,396
  • 5
  • 41
  • 67
  • Hey there Martin, Did you end up solving this issue as I am having the exact same thing? I saw the answer regarding the new .Net debugging tools location and that QT 2.5 might solve this, but looking at QT 2.5 Beta - they did not. So, any other ideas? maybe reverting to .Net 4.0 tools instead of the new 4.5? – Adi Apr 04 '12 at 21:38
  • Hi Adi, i could not solve the issue on Qt Creator, however i downloaded the Qt visual studio plugin(http://qt.nokia.com/downloads/visual-studio-add-in) and was able to debug the application. – Martin Apr 09 '12 at 09:38

7 Answers7

60

I was having the same problems too, and finally figured out how to solve this. Styne666 gave me a hint. Do the following:

  1. Tools
  2. Options...
  3. Build & Run
  4. Tool Chains
  5. Use the "Clone" button to make a copy of each of the auto-detected MSVC items
  6. In each of the cloned items, you can specify the debugger in the "Debugger" field (e.g. C:\Program Files\Windows Kits\8.0\Debuggers\x64\cdb.exe)
  7. After this everything seems to work...

I should further mention that if you are running a 64-bit version of Windows and a 32-bit version of Qt Creator like I am, you need to make sure that you are pointing to the 32-bit versions of cdb (of which there are x86 and x64 target versions). So for the 32-bit target builds I run this:

C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\cdb.exe

And for x64 builds I run this:

C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x64\cdb.exe

The tricky part is that it is somewhat difficult to get Microsoft to install the 32-bit version of the debugging tools on your 64-bit machine. A co-worker tried to do so recently and said that he needed to install the Windows 8 tools in order to have the option to do that - the Windows 7 versions would not let you.

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Colby Boles
  • 616
  • 5
  • 3
  • 2
    Thank You Colby, that worked! This appears to be your first answer. Welcome to stackoverflow! – Martin Apr 16 '12 at 14:23
  • 2
    Totally solved my problem too! All the instructions I've found say to install the Debugging Tools For Windows but don't actually tell you how to configure it for QT Creator. This is perfect. – djcouchycouch Jun 02 '12 at 15:20
  • I have the 7.1 WDK installed yet i could not get rid of that error! do i have to install the 8th version? I am on a 64 bit windows 7 sp1 and qt creator5.2 32 bit! – Hossein Jan 03 '14 at 17:40
  • 2
    Ok, I did as you said, I had to restart QtCreator for the settings to take place.:) Thank you very much :) – Hossein Jan 03 '14 at 17:45
  • On Windows 2008 R2 cdb.exe gets installed to C:\WinDDK\7600.16385.1\Debuggers which is same as wrongly closed https://bugreports.qt-project.org/browse/QTCREATORBUG-6301 Your solution works! – Chawathe Vipul S Jul 26 '14 at 18:52
5

Took me some time to figure out this with Qt Creator 2.6.0 (on Windows 7), so here it is:

  • Tools, Options...
  • Build & Run, Kits tab, select "Desktop (default)" (under Manual)
  • Click the Manage button and select Edit on the right side of "Debugger:"
  • Engine: CDB, Binary: C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe
mBardos
  • 2,872
  • 1
  • 19
  • 16
  • 1
    In the new version of Qt Creator it's in the Kits part of the Options window and not in the Build & Run part. – Donald Duck Aug 15 '18 at 10:37
2

Depending on the version of Visual Studio you have installed you can find the CDB.exe in different locations. Check if it is available in your system by searching in C:\ drive.

In my case I have Windows 7 (x64) with Visual Studio 2012 Express and Visual Studio 2013 installed and I had to install Microsoft Windows SDK for Windows 7 available here in order to have CDB.exe in my system. After the install, QT Creator was able to detect CDB.exe in this location: C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe.

The only thing you need from the SDK is the Common Utilities | Debugging Tools For Windows.

Darien Pardinas
  • 5,910
  • 1
  • 41
  • 48
  • 1
    I tried the SDK at the given link without success on Win7 SP1. But the [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) worked with the same instructions. – jtbr Aug 28 '17 at 14:55
1

I try, first install Visual Studio 2010, After, then in CDB Binary puts: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x86\mpishim100.exe, or only download this file!..

Its the solution!!! In windows 8 64 bits!!

Diosney
  • 10,520
  • 15
  • 66
  • 111
1

I got this error because the version of Visual Studio I had installed was much older than the version of Qt I had installed. I had Visual Studio 2015 installed, but my (much more recent) version of Qt was using Visual Studio 2019's compiler, which apparently isn't compatible with Visual Studio 2015's debugger.

The solution in my case was to uninstall and reinstall both Visual Studio and Qt to make sure I have the latest version of both. You can download the latest version of Visual Studio here (if you don't want to pay you should select "Free download" under "Community"), and you can download the latest version of Qt here.

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
  • I have the latest version of both (Well, the latest Qt and the VisualStudio version it wanted me to download) and it isn't auto detecting the debugger, and it seems to have moved since all of the past paths don't contain a debugger, where is it now? – Troyseph Sep 04 '21 at 08:59
  • 1
    @Troyseph For me it's at `C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe` (or if you want the one for 32-bit programs it's at `...\x86\cdb.exe`). – Donald Duck Sep 05 '21 at 09:25
  • Thank you, I also hadn't realised that Visual Studio 2019 doesn't install the debugger, you have to seperately install the Windows SDK (which was a real ballache and not at all intuitive!) – Troyseph Sep 07 '21 at 10:14
1

It sounds like what I encountered on OSX with the gdb. If so, the solution for me was (within Qt Creator):

  1. Tools
  2. Options...
  3. Build & Run
  4. Qt Versions
  5. Select the corresponding version
  6. Expand the Details panel
  7. Press the Build button which is inline with "GDB Helper"

In your case, the text would likely be different (CDB instead of GDB perhaps) but the same steps may apply.

Samuel Harmer
  • 4,264
  • 5
  • 33
  • 67
0
  1. Re install windows sdk for respective windows
  2. Correctly configure release/debug dll correctly for any external libraries
Vinoj John Hosan
  • 6,448
  • 2
  • 41
  • 37