简体   繁体   English

Qt创建者调试模式真的很慢

[英]Qt creator debug mode is really slow

Similar questions are here and here 类似的问题在这里这里

My case is I'm using Qt 5.5 with Qt creator 3.5 on a Windows 10 machine. 我的情况是我在Windows 10机器上使用Qt 5.5和Qt creator 3.5。 It takes about 10 to 15 seconds to start debugging my project. 开始调试我的项目大约需要10到15秒。 My project uses quick control. 我的项目使用快速控制。 I'm not sure if that is related. 我不确定这是否相关。

In my Qt creator I can't find CDB debugger. 在我的Qt创建者中,我找不到CDB调试器。 Searching "cdb.exe" in my root disk results in nothing. 在我的根磁盘中搜索“cdb.exe”不会产生任何结果。

My current kit is 我目前的工具包是

  • Debugger: GNU gdb 7.8 for MinGW 4.9.2 32bit 调试器:GNU gdb 7.8 for MinGW 4.9.2 32bit
  • Compiler: MinGW 4.9.2 32bit 编译器:MinGW 4.9.2 32位
  • Qt version: Qt 5.5.1 MinGW 32bit Qt版本:Qt 5.5.1 MinGW 32bit

Edit: CPU: Core i7 3.3GHz Ram: 32GB SSD 编辑: CPU:Core i7 3.3GHz Ram:32GB SSD

Is there any workaround or do I need to install CDB and configure it in Qt creator? 有没有解决方法或我需要安装CDB并在Qt创建器中配置它?

When updating to Qt 5.6.1 in a Windows 10 (Redstone) with Visual Studio Professional 2015 (Update 3), I also faced an epic slowness with cdb.exe. 使用Visual Studio Professional 2015(Update 3)在Windows 10(Redstone)中更新到Qt 5.6.1时,我还遇到了cdb.exe的史诗般的缓慢。 The process (cdb.exe) would just hang Qt Creator for 30+ seconds after the build ended and before the debugging started. 该过程(cdb.exe)将在构建结束后和调试开始之前将Qt Creator挂起30秒。

If others face such slowness, and had no luck caching the symbols, I would like to share that by downloading the Windows 8.1 SDK , installing only the Debugging Tools and re-opening Qt Creator, I was able to update the kit to the auto-detect 8.1 debugger (cdb.exe) and everything started working properly again. 如果其他人面临如此缓慢,并且没有运气缓存符号,我想通过下载Windows 8.1 SDK ,仅安装调试工具并重新打开Qt Creator来分享,我能够将套件更新为自动 -检测8.1调试器(cdb.exe),一切都开始正常工作。

I have been experiencing very slow debugging with Windows 10 Professional, Qt 5.5.1 and Qt Creator 3.5.1, using CDB. 我使用CDB在使用Windows 10 Professional,Qt 5.5.1和Qt Creator 3.5.1时遇到了非常慢的调试问题。 It was pretty much unusable. 它几乎无法使用。 I discovered that the windows debug symbols take a very long time to load. 我发现windows调试符号需要很长时间才能加载。 When I go directly to the windows symbol server, it takes minutes. 当我直接进入Windows符号服务器时,需要几分钟。 So, I downloaded the windows symbols from here: Windows Symbol Packages 所以,我从这里下载了Windows符号: Windows Symbol Packages

I installed the symbols then setup the CDB symbol path in Qt Creator. 我安装了符号,然后在Qt Creator中设置了CDB符号路径。 It's very snappy now. 现在非常活泼。

CDB is part of Windows SDK. CDB是Windows SDK的一部分。 You can get either Windows SDK 8.1 or Windows SDK 10 for your system. 您可以为您的系统获得Windows SDK 8.1Windows SDK 10 Then follow Qt documentation: Setting Up Debugger . 然后按照Qt文档: 设置调试器

for CDB Debugger Go to: for CDB Debugger转到:

Tools >> Options >> Debugger >> CDB Paths 工具>>选项>>调试器>> CDB路径

check Symbol Paths and remove server path ( http://msdl.microsoft.com/download/symbols ) 检查符号路径并删除服务器路径( http://msdl.microsoft.com/download/symbols

I had a horribly slow compilation process with the "straight out of the box" Qt 5.7 with Windows 10. 我使用Windows 10进行了“直接开箱即用”Qt 5.7的编译过程非常缓慢。

I fixed that (compilation times divided by 10) by swapping the MinGW toolchain with the Windows one 我通过将MinGW工具链与Windows工具交换来修复(编译时间除以10)

In Qt Creator, in the Tools/Options/Build & Run, you will need to make sure that the three tabs Qt Versions, Compilers and Debuggers are all set up 在Qt Creator中,在Tools / Options / Build&Run中,您需要确保Qt版本,编译器和调试器的三个选项卡都已设置完毕

Qt Versions need the MSVC2015, that you can get with MaintenanceTools.exe at the root of your Qt installation (C:\\Qt by default) Qt版本需要MSVC2015,您可以在Qt安装的根目录下使用MaintenanceTools.exe(默认情况下为C:\\ Qt)

Compiler needs MSVC C++ 14.0, which I think you get with Visual Studio 2015 (it was already there for me) 编译器需要MSVC C ++ 14.0,我认为你可以使用Visual Studio 2015(它已经在我身边了)

Debugger needs CDB, which you get with Windows Kit 10 调试器需要CDB,Windows Kit 10可以使用它

I installed everything, was sure to add a new kit to my project (Desktop MSVC2015) and poof! 我安装了所有东西,肯定会为我的项目(桌面MSVC2015)添加一个新工具包和poof! Compilation times were gone 编译时间消失了

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

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