How to configure CDB in Qt Creator?

前端 未结 7 1691
故里飘歌
故里飘歌 2020-12-02 14:37

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

相关标签:
7条回答
  • 2020-12-02 14:58

    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
    0 讨论(0)
  • 2020-12-02 14:59
    1. Re install windows sdk for respective windows
    2. Correctly configure release/debug dll correctly for any external libraries
    0 讨论(0)
  • 2020-12-02 15:00

    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.

    0 讨论(0)
  • 2020-12-02 15:00

    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.

    0 讨论(0)
  • 2020-12-02 15:07

    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.

    0 讨论(0)
  • 2020-12-02 15:14

    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!!

    0 讨论(0)
提交回复
热议问题