简体   繁体   English

qt creator调试速度慢

[英]qt creator debug slow

I'm running Qt Creator 2.3.0, based on Qt 4.7.4, on Windows 7 64-bit. 我在Windows 7 64位上运行基于Qt 4.7.4的Qt Creator 2.3.0。 When I run the app from Qt Creator (ctrl+r), everything works great. 当我从Qt Creator(ctrl + r)运行应用程序时,一切都很好。 However, when I debug (F5), executing each line takes forever - as in sometimes 2 minutes to execute a single line of code. 但是,当我调试(F5)时,执行每一行需要永远 - 有时2分钟执行一行代码。

I noticed in the Debugger Log window this line: Debugger: C:\\Program Files (x86)\\Debugging Tools For Windows (x86)\\cdb.exe. 我在调试器日志窗口中注意到这一行:调试器:C:\\ Program Files(x86)\\ Windows调试工具(x86)\\ cdb.exe。 I thought since I'm running Windows 7 x64, I should be using the 64-bit debugger. 我以为自从我运行Windows 7 x64以来,我应该使用64位调试器。 So, I downloaded and installed the Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 as a friend suggested. 因此,我作为朋友建议下载并安装了适用于Windows 7和.NET Framework 3.5 SP1的Microsoft Windows SDK。

Now I see that in Tools..Options..Tool Chains, I have a number of Auto-detected tools. 现在我在Tools..Options..Tool Chains中看到,我有许多自动检测工具。 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. 如果我选择任何Microsoft Windows SDK for Windows - x86,x64,ia64或任何Microsoft Visual C ++编译器9.0 - x86,amd64,x64,ia64 - 调试器设置为“C:\\ Program Files(x86) \\调试工具对于Windows(x86)\\ cdb.exe“,并被禁用,所以我无法更改它。

How do I convince Qt Creator to use the 64-bit version of cdb? 我如何说服Qt Creator使用64位版本的cdb? Is that related to my major problem, the super-slow debugging? 这与我的主要问题,超慢调试有关吗?

I'm using qt-creator 2.5.2, lib 4.8.3 msvc2010, under windows7-64bit, also is too slow, 我正在使用qt-creator 2.5.2,lib 4.8.3 msvc2010,在windows7-64bit下,也太慢了,
even after I had download the debug symbols as cache. 甚至在我将调试符号下载为缓存之后。

but it's solved now, refer: How to configure CDB in Qt Creator? 但它现在已经解决了,请参考: 如何在Qt Creator中配置CDB?

I clone one config, change from default detect: C:\\Program Files\\Debugging Tools for Windows (x64)\\cdb.exe 我克隆了一个配置,从默认检测更改: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 到新安装:C:\\ Program Files(x86)\\ Windows Kits \\ 8.0 \\ Debuggers \\ x86 \\ cdb.exe

After installing Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1, I upgraded to Qt Creator 2.4. 安装Microsoft Windows SDK for Windows 7和.NET Framework 3.5 SP1后,我升级到Qt Creator 2.4。 Now when I debug, it started using x64 cdb! 现在当我调试时,它开始使用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. 即使在重新启动Qt Creator甚至重新启动之后,调试现在也以合理的速度运行:第一次启动主表单可能需要2-3秒,之后可能需要1秒。 Used to take anywhere from a minute to 20 minutes. 过去需要一分钟到20分钟。

So it's working now! 所以它现在正在运作! Hope this is helpful to someone. 希望这对某人有帮助。

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. 如果其他人仍然面临问题,即使要缓存设置符号,重新启动QT Creator或重新启动系统,请考虑从其他版本的Windows SDK下载调试工具。 This worked for me as posted at this answer . 在这个答案中发布的这对我有用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM