4
votes

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. It takes about 10 to 15 seconds to start debugging my project. My project uses quick control. I'm not sure if that is related.

In my Qt creator I can't find CDB debugger. Searching "cdb.exe" in my root disk results in nothing.

My current kit is

  • Debugger: GNU gdb 7.8 for MinGW 4.9.2 32bit
  • Compiler: MinGW 4.9.2 32bit
  • Qt version: Qt 5.5.1 MinGW 32bit

Edit: 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?

5
A quick look at the Qt debug DLLs reveals their size is in excess of 1 gigabyte. Hooking up all that code into the debugging environment takes time. For me it takes 5-6 seconds to start, afterwards it runs ok. - dtech
Did not realize it was that big. - Jerry
10-15 seconds without having it running it a debugger isn't usual though. - Frank Osterfeld
@FrankOsterfeld - what? An average mechanical HDD reads at about 100 mb/sec, so it would take 10 seconds to read the debug libraries alone. It is not clear what kind of system the OP has, how fast CPU, how much RAM, there might be paging involved. I got from 10 seconds to 5 by moving my toolchain from a 10k raptor to an SSD. Maybe you are used to a debugger that keeps data in ram in between debug sessions, but gdb apparently loads everything every time. - dtech
Yes it is a little vague, it is not exactly clear whether the OP is merely running a debug build or debugging. - dtech

5 Answers

4
votes

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. The process (cdb.exe) would just hang Qt Creator for 30+ seconds after the build ended and before the debugging started.

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.

3
votes

I have been experiencing very slow debugging with Windows 10 Professional, Qt 5.5.1 and Qt Creator 3.5.1, using CDB. It was pretty much unusable. I discovered that the windows debug symbols take a very long time to load. When I go directly to the windows symbol server, it takes minutes. So, I downloaded the windows symbols from here: Windows Symbol Packages

I installed the symbols then setup the CDB symbol path in Qt Creator. It's very snappy now.

1
votes

CDB is part of Windows SDK. You can get either Windows SDK 8.1 or Windows SDK 10 for your system. Then follow Qt documentation: Setting Up Debugger.

1
votes

for CDB Debugger Go to:

Tools >> Options >> Debugger >> CDB Paths

check Symbol Paths and remove server path (http://msdl.microsoft.com/download/symbols)

0
votes

I had a horribly slow compilation process with the "straight out of the box" Qt 5.7 with Windows 10.

I fixed that (compilation times divided by 10) by swapping the MinGW toolchain with the Windows one

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 Versions need the MSVC2015, that you can get with MaintenanceTools.exe at the root of your Qt installation (C:\Qt by default)

Compiler needs MSVC C++ 14.0, which I think you get with Visual Studio 2015 (it was already there for me)

Debugger needs CDB, which you get with Windows Kit 10

I installed everything, was sure to add a new kit to my project (Desktop MSVC2015) and poof! Compilation times were gone