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创建者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

我遇到了同样的问题。为我修复它的是在QtCreator首选项->调试器->局部变量和表达式中取消选中"显示QObject名称(如果有(。

我认为您没有使用Qt的调试版本。虽然这个"错误"很烦人,但它实际上确实迫使您使用Qt的调试版本来调试您的项目。它应该让你更有效率 - 当你可以有意义地进入Qt代码时,许多问题更容易解决。

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

最新更新