How to configure CDB in Qt Creator?
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.
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
It sounds like what I encountered on OSX with the gdb. If so, the solution for me was (within Qt Creator):
- Tools
- Options...
- Build & Run
- Qt Versions
- Select the corresponding version
- Expand the Details panel
- 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.
I was having the same problems too, and finally figured out how to solve this. Styne666 gave me a hint. Do the following:
- Tools
- Options...
- Build & Run
- Tool Chains
- Use the "Clone" button to make a copy of each of the auto-detected MSVC items
- 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)
- 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.