Unable to run debugger (Windows 7, Qt Creator 2.3.1, Qt 4.7.3, MinGW 4.4)



  • Hello,

    I am relatively new to Qt. I managed building my application (a library using Qt 4.7.3 for desktop and MinGW 4.4, Qt Creator 2.3.1, together with its client application (exe)) on Windows 7, and also running it.
    When I try to debug it, it fails (it just opens the client application console and doesn't do anything else) with following application output and debugger log:

    APPLICATION OUTPUT:
    Debugging starts
    Debugging has finished

    DEBUGGER LOG:
    Starting debugger 'CdbEngine' for ABI 'x86-windows-msvc2008-pe-32bit'...
    dStart parameters: 'Run D:\v_rep\qt_v_rep-build-desktop-Qt_4_7_3_for_Desktop_-MinGW_4_4__Qt_SDK__Debug\debug\qt_vrep.exe' mode: 1
    dABI: x86-windows-msvc2008-pe-32bit
    dExecutable: D:\v_rep\qt_v_rep-build-desktop-Qt_4_7_3_for_Desktop
    -MinGW_4_4__Qt_SDK__Debug\debug\qt_vrep.exe [terminal]
    dDirectory: D:\v_rep\qt_v_rep-build-desktop-Qt_4_7_3_for_Desktop
    -MinGW_4_4__Qt_SDK__Debug
    dDebugger: C:\QtSDK\pythongdb\python_2.7based\gdb-i686-pc-mingw32.exe
    dProject: D:\v_rep\qt_v_rep (built: D:\v_rep\qt_v_rep-build-desktop-Qt_4_7_3_for_Desktop
    -_MinGW_4_4__Qt_SDK__Debug)
    dQt: C:\QtSDK\Desktop\Qt\4.7.3\mingw
    dQML server: 127.0.0.1:0
    d
    dDebugger settings:
    dUseAlternatingRowColours: false (default: false)
    dFontSizeFollowsEditor: false (default: false)
    dUseMessageBoxForSignals: true (default: true)
    dAutoQuit: false (default: false)
    dLogTimeStamps: false (default: false)
    dVerboseLog: false (default: false)
    dCloseBuffersOnExit: false (default: false)
    dSwitchModeOnExit: false (default: false)
    dUseDebuggingHelper: true (default: true)
    dUseCodeModel: true (default: true)
    dShowThreadNames: false (default: false)
    dUseToolTips: false (default: false)
    dUseToolTipsInLocalsView: false (default: false)
    dUseToolTipsInBreakpointsView: false (default: false)
    dUseAddressInBreakpointsView: false (default: false)
    dUseAddressInStackView: false (default: false)
    dRegisterForPostMortem: false (default: false)
    dLoadGdbInit: true (default: true)
    dScriptFile: (default: )
    dWatchdogTimeout: 20 (default: 20)
    dTargetAsync: false (default: false)
    dMaximalStackDepth: 20 (default: 20)
    dAlwaysAdjustStackColumnWidths: false (default: false)
    dShowStandardNamespace: true (default: true)
    dShowQtNamespace: true (default: true)
    dSortStructMembers: true (default: true)
    dAutoDerefPointers: true (default: true)
    dAlwaysAdjustLocalsColumnWidths: false (default: false)
    dListSourceFiles: false (default: false)
    dSkipKnownFrames: false (default: false)
    dEnableReverseDebugging: false (default: false)
    dAllPluginBreakpoints: true (default: true)
    dSelectedPluginBreakpoints: false (default: false)
    dAdjustBreakpointLocations: true (default: true)
    dAlwaysAdjustBreakpointsColumnWidths: false (default: false)
    dNoPluginBreakpoints: false (default: false)
    dSelectedPluginBreakpointsPattern: .* (default: .)
    dBreakOnThrow: false (default: false)
    dBreakOnCatch: false (default: false)
    dBreakOnWarning: false (default: false)
    dBreakOnFatal: false (default: false)
    dAlwaysAdjustRegistersColumnWidths: false (default: false)
    dAlwaysAdjustSnapshotsColumnWidths: false (default: false)
    dAlwaysAdjustThreadsColumnWidths: false (default: false)
    dAlwaysAdjustModulesColumnWidths: false (default: false)
    dState changed from DebuggerNotReady(0) to EngineSetupRequested(1).
    dQUEUE: SETUP ENGINE
    dCALL: SETUP ENGINE
    Attaching to 6944...
    Launching C:\QtSDK\pythongdb\python_2.7based\gdb-i686-pc-mingw32.exe -aqtcreatorcdbext.dll -lines -G -c .idle_cmd !qtcreatorcdbext.idle -y symsrv
    symsrv.dllC:\Users\marc\AppData\Local\Temp\symbolcachehttp://msdl.microsoft.com/download/symbols -p 6944 -pr -pb
    using C:\QtSDK\QtCreator\lib\qtcreatorcdbext32\qtcreatorcdbext.dll of 29.09.2011 00:56:13.
    C:\QtSDK\pythongdb\python_2.7based\gdb-i686-pc-mingw32.exe running as 1632
    CDB exited (1)
    dNOTE: ENGINE SPONTANEOUS SHUTDOWN
    dState changed BY FORCE from EngineSetupRequested(1) to EngineShutdownOk(22).
    dState changed from EngineShutdownOk(22) to DebuggerFinished(23).
    dQUEUE: FINISH DEBUGGER
    dNOTE: FINISH DEBUGGER
    dHANDLE RUNCONTROL FINISHED
    sDebugger finished.

    Above debugger output appears very criptic to me. Is there something obvious that I forgot?
    When in the debug configuration, I use following settings: Qt 4.7.3 for desktop - MinGW 4.4 (Qt SDK) Debug

    Thanks for any insight


  • Moderators

    Do you have also msvc2008 installed on your machine?

    In the first lines it sais that the engine for msvc2008 is started, but your compilation is for mingw. To my understanding are debug version of msvc and mingw are not compatible. So there would be a start to look for the problems. However, I am not using creator on windows. So, I have no experience there. But you might want to check the debugger options in creator and see, if there is a reference to msvc2008.



  • Thank you for the reply Koahnig,

    Actually I have msvc2005 installed, but I didn't compile with it like you said. I would prefer using the debugger that comes with the Qt SDK, and I thought that would be the default way. How can I switch to that other debugger (GDB isn't it?). I found contradictory information whether GDB is automatically installed with Qt SDK or not. Is following instruction the way to go (building GDB on windows)?

    http://developer.qt.nokia.com/wiki/QtCreatorBuildGdb

    Sorry if my problem is obvious to some people...


  • Moderators

    I would expect that qt sdk includes the qt creator installation with the debugger and you can use out of the box. Apparently, creator found your msvc installation and did include it into its environment. Strange is that is report something with msvc2008 and not the compiler as installed (msvc2005).

    In my opinion there is no need to compile GDB as mentioned in the link you provide.

    Nothing is obvious about your problem in my opinion, so do not worry.



  • Thank you again for your reply Koahnig,
    Is there then a way where I can instruct Qt Creator to start the GDB instead of the MSVC2008 compiler? There must be a switch, a drop-down or a file setting for that.


  • Moderators

    [quote author="floatingWoods" date="1318201299"]
    Is there then a way where I can instruct Qt Creator to start the GDB instead of the MSVC2008 compiler? [/quote]

    For sure there is a way.
    Did you have a look to "this":http://doc.qt.nokia.com/qtcreator-2.3/creator-debugger-engines.html ?
    Unfortunaltely, I cannot guide you, since I have not installed creator on win7. My linux install will not help here.


  • Moderators

    If you are using a custom executable run configuration then your issue should be fixed by upgrading to Qt Creator 2.4-branch (or master).



  • Thank you Koahnig and Tobias. I will look into those options as soon as possible. Thanks a lot


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.