qt Creator 调试速度慢
我正在 Windows 7 64 位上运行基于 Qt 4.7.4 的 Qt Creator 2.3.0。当我从 Qt Creator (ctrl+r) 运行该应用程序时,一切都运行良好。然而,当我调试 (F5) 时,执行每一行都需要很长时间 - 有时执行一行代码需要 2 分钟。
我在调试器日志窗口中注意到这一行:调试器:C:\ Program Files(x86)\ Debugging Tools For Windows(x86)\ cdb.exe。我想既然我运行的是 Windows 7 x64,我应该使用 64 位调试器。因此,我按照朋友的建议下载并安装了适用于 Windows 7 的 Microsoft Windows SDK 和 .NET Framework 3.5 SP1。
现在我看到在工具..选项..工具链中,我有许多自动检测到的工具。如果我选择任何 Microsoft Windows SDK for Windows - x86、x64、ia64 或任何 Microsoft Visual C++ 编译器 9.0 - x86、amd64、x64、ia64 - 调试器将设置为“C:\Program Files (x86)” \Debugging Tools For Windows (x86)\cdb.exe”,并且已禁用,因此我无法更改它。
如何说服 Qt Creator 使用 64 位版本的 cdb?这与我的主要问题(调试速度超慢)有关吗?
I'm running Qt Creator 2.3.0, based on Qt 4.7.4, on Windows 7 64-bit. When I run the app from Qt Creator (ctrl+r), everything works great. However, when I debug (F5), executing each line takes forever - as in sometimes 2 minutes to execute a single line of code.
I noticed in the Debugger Log window this line: Debugger: C:\Program Files (x86)\Debugging Tools For Windows (x86)\cdb.exe. I thought since I'm running Windows 7 x64, I should be using the 64-bit debugger. So, I downloaded and installed the Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 as a friend suggested.
Now I see that in Tools..Options..Tool Chains, I have a number of Auto-detected tools. If I select any of the Microsoft Windows SDK for Windows - x86, x64, ia64, or any of the Microsoft Visual C++ Compiler 9.0 - x86, amd64, x64, ia64 - the Debugger is set to "C:\Program Files (x86)\Debugging Tools For Windows (x86)\cdb.exe", and is disabled so I can't change it.
How do I convince Qt Creator to use the 64-bit version of cdb? Is that related to my major problem, the super-slow debugging?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
安装适用于 Windows 7 的 Microsoft Windows SDK 和 .NET Framework 3.5 SP1 后,我升级到 Qt Creator 2.4。现在,当我调试时,它开始使用 x64 cdb!由于某种原因,前几次仍然非常慢。然而,当我尝试计时时,它现在以合理的速度运行。即使重新启动 Qt Creator 甚至重新启动后,调试现在也以合理的速度运行:第一次可能需要 2-3 秒才能调出主窗体,此后需要 1 秒。过去需要 1 分钟到 20 分钟不等。
所以现在可以了!希望这对某人有帮助。
After installing Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1, I upgraded to Qt Creator 2.4. Now when I debug, it started using x64 cdb! The first couple times were still very slow for some reason. However, when I tried to time it, it's now working at a reasonable speed. Even after re-starting Qt Creator or even rebooting, debugging is now running at a reasonable speed: maybe 2-3 seconds to bring up my main form the first time, and 1 second thereafter. Used to take anywhere from a minute to 20 minutes.
So it's working now! Hope this is helpful to someone.
我使用的是qt-creator 2.5.2,lib 4.8.3 msvc2010,在windows7-64bit下,也太慢了,
即使我下载了调试符号作为缓存。
不过现在已经解决了,参考:
如何在 Qt Creator 中配置 CDB?
我克隆一个配置,更改从默认检测:
C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe
到新安装:
C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\cdb.exe
I'm using qt-creator 2.5.2, lib 4.8.3 msvc2010, under windows7-64bit, also is too slow,
even after I had download the debug symbols as cache.
but it's solved now, refer:
How to configure CDB in Qt Creator?
I clone one config, change from default detect:
C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe
to new install:
C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86\cdb.exe
如果其他人在设置要缓存的符号、重新启动 QT Creator 或重新启动系统后仍然面临该问题,请考虑从其他版本的 Windows SDK 下载调试工具。正如在此答案中发布的那样,这对我有用。
If others are still facing the issue even after settings symbols to be cached, restarting QT Creator or rebooting the system, please consider downloading the Debugging Tools from another versions of the Windows SDK. This worked for me as posted at this answer.