如何让Qt Creator使用CDB? [英] How to get Qt Creator to work with CDB?

查看:824
本文介绍了如何让Qt Creator使用CDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7上使用 Qt Creator 2.01 32位元与Qt 4.7.1 64位。我使用Microsoft Visual C ++ 2010编译我的Qt库。现在我想使用 CDB 与Qt Creator(或 GDB (如果有效),或无论是最好的选择)。我需要做什么才能用CDB调试(所以我可以设置断点和看符号)?

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)?

请不要只是指向< a href =http://qt-project.org/doc/qtcreator-2.8/creator-debugger-engines.html =nofollow> http://qt-project.org/doc/qtcreator-2.8/ creator-debugger-engines.html ,因为我一直在那里,我仍然缺少一些东西。我有Windows SDK安装了调试工具(但我认为它是64位版本)。我正在寻找的是什么选项,我需要在Qt Creator中设置,以获得这一切的所有设置。

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.

编辑:
另外我应该澄清我认为调试器的工作,因为我可以打F5,我的应用程序启动,然后我可以选择调试 - >中断,它似乎停止。但是在调用堆栈中,函数名称看起来被破坏,并且在编辑器中设置的断点不会中断。如果我点击 F10 ,那么它会看起来像汇编的代码。也许是因为我正在构建一个DLL,我设置 F5 来运行父应用程序,反过来加载并调用我的DLL。

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.

推荐答案

因为你的Qt是用MSVC编译的,最好的选择是CDB(对于GDB你需要,例如,一个MinGW编译版本)。

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

调试应该是开箱即用的。我可以想到的第一点是是否由于某种原因Qt Creator没有看到您的调试工具为Windows。您是否已确认在CDB选项页面中正确指定了它的路径(和版本)?

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?

此外,您是否考虑切换到 Qt Creator 2.1 (它有很多改善区域)?或者更好的是 2.2分支的自编译版本,其中包括对CDB引擎。

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.

这篇关于如何让Qt Creator使用CDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆