Qt Creator调试器非常慢

Mar*_*lle 10 debugging macos qt qt-creator

我正在使用Qt Creator调试器但是当我想this通过从Locals和表达式视图扩展它来检查当前变量时,在返回控制之前需要相当长的时间(大约30秒).

我在Debugger Log视图中注意到以下消息:

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
Run Code Online (Sandbox Code Playgroud)

我正在使用:

  • Qt 5.9.2
  • Qt Creator 4.5.0
  • OSX 10.12.6.

编辑:

正如Kuba Ober建议我使用Qt(5.10.0)的调试版本,感谢这个链接:Qt Creator调试器很慢

不幸的是,消息已更改为:

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
Run Code Online (Sandbox Code Playgroud)

小智 12

我遇到了同样的问题。为我修复的是在 QtCreator Preferences -> Debugger -> Locals & Expressions 中取消勾选“如果可用,则显示 QObject 名称”。