PDA

View Full Version : properly debugging w/ cdb, Qt Creator and Visual C++ 2010 Express?



akos.maroy
22nd January 2012, 19:02
Hi,

I'm trying to get debugging working properly, using Qt Creator, MS Visual C++ 2010 Express, and the MS Debugging tools. I can properly compile & link executables from within Qt Creator, using the C++ compiler that comes with the MS Visual C++ 2010 Express installation.

But, as noted here as well: http://doc.qt.nokia.com/qtcreator-snapshot/creator-debugger-engines.html#setting-the-symbol-server-in-windows , Visual C++ Express does not come with a debugger. As noted on this page as well, one can download & install the Windows SDK debugger, and supposedly use it from within Qt.

So, this is what I have done, installed the Debugger from the link provided in the previous page: http://msdn.microsoft.com/en-us/windows/hardware/gg463012

After that, I cloned the toolchain in Qt Creator, and specified the debugger executable for it in the toolchain configuration page, to be: C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\Mdbg.exe

so far so good. when I build in debug mode, then press on the 'Start Debugging' button, Qt Creator seems to recognize the debugger. it asks me to set up the symbol server cache, and then it seems to start the application.

But, unfortunately the debugger fails, with the following message:


Launching C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\Mdbg.exe -aqtcreatorcdbext.dll -lines -G -c .idle_cmd !qtcreatorcdbext.idle -y symsrv*symsrv.dll*C:\Users\akos\AppData\Local\Temp \symbolcache*http://msdl.microsoft.com/download/symbols C:\test\test.exe
using C:\QtSDK\QtCreator\lib\qtcreatorcdbext32\qtcreator cdbext.dll of 1/22/2012 4:07:03 PM.
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\Mdbg.exe running as 964
MDbg (Managed debugger) v3.5.30729.1 (SP.030729-0100) started.
Copyright (C) Microsoft Corporation. All rights reserved.
For information about commands type "help";
to exit program type "quit".
run -aqtcreatorcdbext.dll -lines -G -c ".idle_cmd !qtcreatorcdbext.idle" -y symsrv*symsrv.dll*C:\Users\akos\AppData\Local\Temp \symbolcache*http://msdl.microsoft.com/download/symbols C:\test\test.exe
Could not detect debuggee version -- using latest debugger API.
Error: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

and then the whole process 'hangs'.

am I doing something wrong here? how does one set this up properly?


Akos

amleto
22nd January 2012, 21:21
visual studio express does come with a debugger - you can compile and debug using only studio express.

Having said that, I'm not sure how to fix your issue. I followed instructions and it worked, but I d/l symbol cache before dubugging.

akos.maroy
22nd January 2012, 21:25
visual studio express does come with a debugger - you can compile and debug using only studio express.

Having said that, I'm not sure how to fix your issue. I followed instructions and it worked, but I d/l symbol cache before dubugging.

I persume you mean debugging from within Visual Studio. I'm looking to debug from within Qt Creator.