Qt Creator调试器非常慢

时间:2018-01-03 11:41:53

标签: macos qt debugging qt-creator

我正在使用 Qt Creator 调试器,但是当我想通过从本地和表达式视图展开来检查当前this变量时,需要在回馈控制权之前相当长(约30秒)。

我在调试器日志视图中注意到以下消息:

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

我正在使用:

  • Qt 5.9.2
  • Qt Creator 4.5.0
  • OSX 10.12.6

修改

正如Kuba Ober建议我使用Qt(5.10.0)的调试版本,感谢此链接:Qt Creator debugger very slow

不幸的是,邮件已更改为:

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

3 个答案:

答案 0 :(得分:2)

我猜你没有使用Qt的调试版本。虽然这个“bug”很烦人,但实际上它会强制您使用Qt的调试版本来调试项目。它应该会提高你的工作效率 - 当你有意义地进入Qt代码时,很容易解决许多问题。

答案 1 :(得分:2)

我遇到了同样的问题。解决这个问题的方法是解开"显示QObject名称(如果可用)"在QtCreator首选项中 - >调试器 - >当地人和表达式。

答案 2 :(得分:0)

我有类似的问题,他们大多是通过将我的编译器更改为与我正在使用的lldb相同的目录中的Clang来解决的。 (顺便说一下,Clang的文件名是gcc。)