CDB loads variables very slowly in Qt Creator
Asked Answered
T

3

6

I have tried a lots of advice to help to set up the CDB debugger in Qt Creator but when using it that thing still takes ages to load up local variables.

My setup:

  • Windows 10 64-bit
  • Qt 5.6 (installed with sources)
  • Qt Creator 3.6.1
  • Microsoft Visual Studio 14 (2015) (both 32-bit and 64-bit compilers)
  • Windows SDK (for debugging tools = CDB)

The General tab in Options->Debugging lists auto-detected sources:

Source: Q:/qt5_workdir/w/s
Target: C:\Qt\5.6\Src

My symbols server and cache are set up in CDB Paths like this:

srv*http://msdl.microsoft.com/download/symbols
cache*C:\Qt\CDB-symbols-cache

On first run of the debugger it populates this directory with 70mb of (presumably downloaded) data but it does not seem to change afterwards on subsequent runs.

I suspect either the sources being loaded takes a long time (although I have a SSD) or that the CDB is re-downloading the symbols instead of using the cache. Any advice?

EDIT: As per request, result of .sympath command on my system:

Symbol search path is: srv*

Expanded Symbol search path is: cache*;SRV*https://msdl.microsoft.com/download/symbols

************* Symbol Path validation summary **************

Response Time (ms) Location

Deferred
srv*

Twyla answered 28/3, 2016 at 16:33 Comment(5)
In some cases the problem can be: a) wrong debugger version (x86 application vs x64 debugger); b) expressions in watch list (it is told they can persist even when deleted in interface, check default.qws in AppData\Roaming\QtProject). I have much the same problem, though (in my case cdb.exe has max CPU usage for minutes before showing local variables).Bema
@Bema Not a solution per se but since I asked I have updated Qt to 5.7, VS2015 to update 2 and reinstalled the Windows SDK to higher version as well (cannot be updated). The problem essentially disappeared with CDB now loading the variables in pretty comparable way for example MingW toolchain debugger does (relatively fast). I reckon it was some incompatibility in that mix I had previously. So if you can try updating if it helps.Twyla
Can you show the exact output of .sympath please?Iconoclast
@ThomasWeller I have added the output of that command to the post.Twyla
I have the same problem. As read in wiki I saw a lot of WARNING: Unable to verify checksum for ...dll but could not try their solution on my project, maybe it can help you though.Seaboard
F
4

I had the same problem with QtCreator 4.12 which was solved by removing AppData\Roaming\QtProject\default.qws as suggested by Abstraction in the comments above.

Fewer answered 14/5, 2020 at 15:29 Comment(0)
G
3

I had the same issue with QtCreator 4.0.2 and VS 2015. Here is what I did.

  1. Downloaded the microsoft symbol package from symbol packages
  2. Copied it to a local folder(D:\Symbols)
  3. In QtCreator , Tools->Options->Debugger->CDB Paths select "Insert Symbol Server" and select the local folder. Will look like the below screen.

enter image description here

Goosander answered 14/11, 2016 at 11:35 Comment(1)
In the end, it is still rather slow and now I am using Visual Studio where debugging and inspecting variables is at least 20 times faster.Goosander
H
0

I tried all the above and did not worked, however one thing worked: renaming the file default.qws

Usually it would take 10 seconds to load the debugger and it went to 10 minutes. Analyzing deeper I found out that the problem is with the breakpoints: if a breakpoint is on a file which is not part of the project, the debugger attempts to resolve the breakpoint for each loaded module/DLL, making the process incredibly slow.

The solution is to edit the file default.qws and remove those breakpoints which are set to files that don't exists anymore and you will get the speed as before.

Hadj answered 28/3, 2016 at 16:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.