Qt World Summit: Register Today!

How to configure CDB in Qt Creator?

  • http://stackoverflow.com/q/9975949/559085

    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.

  • The debugger was moved around in the new windows SDK, so Creator currently fails to detect it.

    You will need a new Qt Creator to make this work. The upcoming Qt Creator 2.5 should be fine, master builds definitely are.

  • Hi, sorry to bump a somewhat old post, but I was having the exact same error. I followed the steps that were laid out on this same post in stackoverflow, and the error went away, but now the debugger doesn't work at all. It gets up to this point:

    Assembly options: source_line
    Qt Creator CDB extension version 0.11 (Qt 5 support) 32 bit built Jan 26 2012.
    dTaking notice of pid 4448
    dState changed from InferiorSetupRequested(4) to InferiorSetupOk(6).
    dState changed from InferiorSetupOk(6) to EngineRunRequested(7).
    dState changed from EngineRunRequested(7) to InferiorRunOk(11).
    ModLoad: 72480000 72500000 C:\Windows\SysWOW64\uxtheme.dll
    ModLoad: 021b0000 02dfa000 C:\Windows\SysWOW64\shell32.dll
    ModLoad: 021b0000 022c0000 C:\Windows\SysWOW64\kernel32.dll
    ModLoad: 021b0000 022b0000 C:\Windows\SysWOW64\user32.dll
    ModLoad: 021b0000 022b0000 C:\Windows\SysWOW64\user32.dll

    And then it just sits there and doesn't do anything. Some things that might be part of the problem: looking at the tool chains in Tools->Options->Build & Run, I see no less than five MSVC compilers auto-detected:

    Microsoft Virtual C++ Compiler 10.0 (x86)
    Microsoft Virtual C++ Compiler 10.0 (x86)
    Microsoft Virtual C++ Compiler 10.0 (amd64)
    Microsoft Virtual C++ Compiler 10.0 (x64)
    Microsoft Virtual C++ Compiler 10.0 (ia64)

    I ended up using the cdb x86 version for the first two, and the x64 version for the last three... but maybe this isn't right? I'm pretty much flying blind here because I have such scarce knowledge of basically anything outside of the actual programming part.

    I'm going nuts with this, because I have two other computers running Qt Creator perfectly, and this one just refuses to :( I don't know what to do; I'm not a veteran programmer and I don't even really know what it is I'm doing. I'm just trying to get this thing to WORK so that I can start learning! Help please!! :O

  • The several different MSVC compilers are fine: You can actually switch the compiler to produce code for all those architectures by using the setup scripts that come with the compiler. Since it is rather hard to find out which of those are identical in any programmatic way we just leave in the duplicates that the setup scripts report.

    The debugger log looks ok to me. Are you sure your application did not just quit without doing anything?

  • Do we have an update on this? I'm running Creator 2.5.2 and none of the auto-detected MSVC compilers show a debugger. Someone on stackoverflow suggested cloning the auto-detected compilers, and manually pointing the debuggers to them:

    "stackoverflow article":http://stackoverflow.com/questions/9975949/how-to-configure-cdb-in-qt-creator

    but...is that really the right way to do this?

  • That most certainly does work. Contrary to the claims made on stackoverflow both the 64bit and the 32bit debugger should work fine on a 64bit windows.

    Of course auto-detection should also work:-) Please "file a bug report":https://bugreports.qt-project.org/ if it does not.

Log in to reply