Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Creator debugger very slow

I'm using Qt Creator debugger but when I want to inspect the current this variable by expanding it from the Locals and expressions view, it take quite a long (about 30 seconds) before giving back control.

I noticed the following message in the Debugger Log view:

3518fetchVariables({"autoderef":1,"context":"","displaystringlimit":"100","dyntype":1,"expanded":["return","inspect","local.this","watch","local"],"fancy":1,"formats":{},"nativemixed":0,"partialvar":"local.this","passexceptions":0,"qobjectnames":1,"stringcutoff":"10000","token":3518,"typeformats":{},"watchers":[]})
(lldb) script theDumper.fetchVariables({"autoderef":1,"context":"","displaystringlimit":"100","dyntype":1,"expanded":["return","inspect","local.this","watch","local"],"fancy":1,"formats":{},"nativemixed":0,"partialvar":"local.this","passexceptions":0,"qobjectnames":1,"stringcutoff":"10000","token":3518,"typeformats":{},"watchers":[]})
bridgemessage={msg="Searching for type QObjectPrivate across all target modules, this could be very slow"},
eERROR: Lldb stderr: error: PlaybackDevice.o DWARF DW_TAG_array_type DIE at 0x0000db86 has a class/union/struct element type DIE 0x0000db92 that is a forward declaration, not a complete definition.
Try compiling the source file with -fno-limit-debug-info or disable -gmodule

I'm using:

  • Qt 5.9.2
  • Qt Creator 4.5.0
  • OSX 10.12.6.

Edit:

As Kuba Ober suggests I use a debug build of Qt (5.10.0) thanks to this link: Qt Creator debugger very slow

Unfortunately the message has changed to:

eERROR: Lldb stderr: error: PlayBackDevice.o DWARF DW_TAG_array_type DIE at 0x0000f43e has a class/union/struct element type DIE 0x0000f44a that is a forward declaration, not a complete definition.
Try compiling the source file with -fno-limit-debug-info or disable -gmodule
like image 447
Martin Delille Avatar asked Jan 03 '18 11:01

Martin Delille


2 Answers

I was having the same issue. What fixed it for me was unticking "Show QObject names if available" in QtCreator Preferences -> Debugger -> Locals & Expressions.

like image 66
James Hallowell Avatar answered Oct 18 '22 05:10

James Hallowell


You're not using a debug build of Qt, I presume. While this "bug" is annoying, it does in effect force you to use a debug build of Qt to debug your projects. It should make you way more productive - many problems are easier to fix when you can meaningfully step into the Qt code.

like image 45
Kuba hasn't forgotten Monica Avatar answered Oct 18 '22 04:10

Kuba hasn't forgotten Monica