Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using Qt Creator 2.01 32-bit with Qt 4.7.1 on Windows 7 64-bit. I compiled my Qt library using Microsoft Visual C++ 2010. Now I want to use CDB with Qt Creator (or GDB if that works, or whatever is the best option). What exactly do I need to do to be able to debug with CDB (so I can set break points and see symbols)?

Please don't just point me to http://qt-project.org/doc/qtcreator-2.8/creator-debugger-engines.html because I've been there and I'm still missing something. I have Windows SDK installed with debugger tools (but I think it's the 64-bit version). What I'm looking for is what options I need to set in Qt Creator to get this all setup.

EDIT: Also I should clarify I think the debugger kind of works because I can hit F5 and my application starts and then I can select "debug->interrupt" and it seems to stop. But in the call stack the function names look mangled and breakpoints set in the editor don't break. If I hit F10, then it steps through the code in what looks like assembly. Maybe it's because I'm building a DLL and I set F5 to run the parent application which in turn loads and calls my DLL.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
303 views
Welcome To Ask or Share your Answers For Others

1 Answer

Since your Qt is compiled with MSVC the best option is indeed CDB (for GDB you would need, for example, a MinGW compiled version).

Debugging should be out of the box. One first point I could think is whether for some reason Qt Creator doesn't see your debugging tools for Windows. Have you made sure that the path (and the version) for it is correctly specified in the CDB options page?

Also, have you considered switching to Qt Creator 2.1 (it has a lot of improvements in the area)? Or even better, a self-compiled version of the 2.2 branch, which includes a total refactoring of the CDB engine.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...