Qt World Summit: Register Today!

Setting Visual Studio 2015 debugger

  • I am using VSExpress 2015 with Qt. Qt installed properly and compiles correctly simple VC++ desktop programs. However, the Qt installer, apparently, did not locate the Debugger from VSE2015. Do I so another installation of Qt or can I set the debugger manually?
    F5 produces this error:

    Could Not Run

    Unknown debugger type "No engine"
    Unable to create a debugger engine of the type "No engine"


  • Moderators

    Hi, welcome to devnet,

    You can't use the built-in debugger of Visual Studio. You need to install a debugging engine called CDB separately.
    Download and install Windows SDK and during installation select an optional component called "debugging tools for windows". This will install CDB which you can then hook to your Qt kit in the Qt Creator.

  • Thanks for the help.
    Now that I have downloaded and installed "Windows Software Development Kit (SDK) for Windows 10" from "https://dev.windows.com/en-US/downloads/windows-10-sdk", how do I hook up CDB to Qt in the Qt Creator?

  • Moderators

    First confirm that Qt Creator is recognizing the debugger correctly: go to Tools -> Options -> Build & Run -> Debuggers. CDB should be listed there.
    If it's there then switch to "Kits" tab, select the kit you want the debugger set for and from the Debugger combo select the newly installed CDB.

  • I tried "Tools -> Options -> Build & Run -> Debuggers, but auto-detect is blank. Adding it manually would be an option I would take, but I don't know where the CDB would be located.

  • Moderators

    If you used the default location for Windows SDK it should be in C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe.
    Switch x64 to x86 for the 32bit version.

  • Thanks again for the help.
    Unfortunately this directory does not contain the CDB.
    Volume in drive C has no label.
    Volume Serial Number is DC4F-CF6B

    Directory of C:\Program Files (x86)\Windows Kits\10\Debuggers\x64

    2015-11-09 09:20 PM <DIR> .
    2015-11-09 09:20 PM <DIR> ..
    2015-07-09 10:26 PM 1,514,688 dbghelp.dll
    2015-07-09 10:26 PM 114,368 srcsrv.dll
    2015-07-09 10:26 PM 156,864 symsrv.dll
    3 File(s) 1,785,920 bytes
    2 Dir(s) 210,909,159,424 bytes free

  • Moderators

    As I said earlier - debugging tools are an optional component of Windows SDK. Did you select it in the installer?

  • I am 100% sure that when I first installed the SDK I "selected "debugging tools for windows" as one of the options, but nonetheless, to be 100% sure, I uninstalled the SDK and then reinstalled it. After reinstalling the SDK Qt Creator *is recognizing the debugger correctly. However, when I F5 it, I am still getting the same message. What else should I do?

  • Moderators

    Did you add it to your kit like I mentioned (don't forget to hit apply button ;) )?

  • Hello,
    I'm interrested in your tchat, because I have the same question. Chris, I followed your procedure, but the install of VS sdk ask nothing. As it is ths "vssdk_full" from MS, I expexted all ok. But the C:\Program Files (x86)\Windows Kits\10\ directory has no Debuggers sub dir.
    Is there a special location for the vssdk ?

  • Moderators

    @Furkas Visual Studio SDK is something else. It is an SDK for developing VS extensions and it does not contain "Debugging tools for Windows". We were talking about "Windows SDK", not "Visual Studio SDK". Note that Visual Studio 2015 also installs Windows SDK, but it's a stripped down version that does not have debugging tools component. To get full Windows SDK with debugging tools component use this link.

  • Yes,
    I follow and documented, with pictures, the whole installation of the Windows SDK you recommended. Then I checked "Tools -> Options -> Build & Run -> Debuggers" to make sure that Qt Creator had found the debugger and, well, yes, it did. Please have a look on the link above.
    Thanks so much Chris.

  • Moderators

    That's the debuggers tab. That's the first half of what I suggested.
    I meant did you add the debugger to the kit i.e. switch to "Kits" tab, select your kit and set one of the detected debuggers there.

  • @Chris-Kawa
    Oh, I see, yes your are right.
    Here is what it looks like right now, is this OK?

  • Moderators

    is this OK?

    I can't tell from that picture. Click on the kit you are using in your project. The details for it will be shown below. In there there's a "debugger" combo box. If it's empty then open it, select CDB from the list and hit apply.

    Btw. The list there shows Qt packages compiled for VS2012 and 2013. If you're using VS2015 none of these will work correctly. You can't mix & match VS versions.

  • @Chris-Kawa

  • @DelNoble , @Chris Kawa
    More information : i'm using W7 64b, and the 2015 has no dbg under W8. I think it's the reason of my first trouble.
    I tried to load Windows SDK for W7, but the install failed.
    I retry to use Qt with minGW, (my first attempt), but I'm stucked on the debug error "do not support python scripting...".
    I deleted my minGW, et reloaded the latest version, carrefully installing the "mingw32_gdb_python" in the package.
    But as I try to configure Qt kit with this debuger, it's marqued "Not recognised" in the type. Qt then has the error "Unable to create a debugger engine if the type "No engine"".
    Where can I find a dbg runable with Qt and minGW, or, where can I find the information for a proper install ?

  • Lifetime Qt Champion

    @Furkas Just install MinGW which is provided through the Qt installer.

  • @jsulm : Don't find minGW through Qt Installer. I selected Qt Open Source in the download page. I do not plan to buy Qt.
    What version of Qt include the MinGW ?

  • Moderators

    @Furkas Please don't hijack other people threads. If you want to ask about MinGW start another thread. MinGW is provided as an all-in-the-box option in the online installer for both commercial and free licenses.

  • Moderators

    @DelNoble The kits without exclamation marks look ok. The other two are missing a debugger (again - see the "Debugger" combo in their properties). For those just select a debugger from that combo and you should be good to go.

  • @Chris-Kawa
    Thank you Chris, it is working now. A thousand thanks and keep up the good work Chris... you're the man!!

  • Moderators

    I'm glad I could help. If your problem is solved please mark the thread as solved from the "Topic Tools" button menu.

  • I read the post and all is ok,
    Many thank Chris.

  • I am writing this for future reference.

    Visual Studio 2015 installs Window SDK without debugger. You cannot change how it is installed at the moment of installation.
    After installation you have to go to "Control Panel"->"Programs & Features" and select installed "Windows Software Development Kit". Then change the install to include debugger.

  • @Chris-Kawa When we selected the Debugger in Kits tab, we also have to select the compiler.

    Right now I am getting 4 options for compilers :
    Which compiler should I choose in this case?

  • Moderators

    Which compiler should I choose in this case?

    Depends on what case that is. These are C and C++ compilers:
    x86 - 32bit compiler producing 32bit binaries
    amd64 - 64bit compiler producing 64bit binaries
    amd64_x86 - 64bit cross-compiler producing 32bit binaries
    x86_amd64 - 32bit cross-compiler producing 64bit binaries

    Choose the one you want for your project.

Log in to reply