Tuesday, June 18, 2013

Getting the Qt Creator debugger to work on Windows

Installing the default Qt package for Windows installs the Qt Creator IDE, and everything else you need to write GUI apps, but once you try to debug your first program you get an unexpected surprise.  Unless you have installed the appropriate Windows SDK, the debugger functionality in Creator won't work.  You will get an error message saying the debugger is not configured.

The following is what I had to do to get the debugger to run on Windows 8 x64 with Qt 5:

  1. Download the Windows SDK for Windows 8.  If you have Visual Studio 2012 and selected the appropriate option during that installation, you won't have to run this.
  2. Run the installer for the SDK, and when prompted select the debuggers checkbox.  This is the only thing you really need.  If you want the full SDK select the other checkboxes.
  3. Open the Qt Creator IDE. Go to Tools -> Options -> Build & Run -> Kits.  In the Auto-detected field you should see an entry for your version of Qt.  Selecting it you should see the debugger has been configured for CDB Engine.  If you see < None > for the debugger, you will have to manually navigate to the CDB executable.  The path on my computer is:

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

No comments: