QT+CDB进行debug调试无法查看QString等qt相关变量值问题的修复

问题

如标题所述,使用QT在CDB调试器在qtcreator下调试时,发现,若调试的位置存在QString、QByteArray等QT库的变量,则会导致所有变量的值无法查看,鼠标移动到对应变量位置也只能查看到too complex。

环境

QT6.6.1+MSVC2019+CDB

修复方案

1、在调试器的CDB模块下取消勾选Use Python dumper;
在这里插入图片描述
2、找到项目构建目录,将该目录删除;
该步骤用于确保项目重新完整构建,防止出现第一步已经取消勾选Use Python dumper,但是仍然查看不了变量的情况。
在这里插入图片描述

问题分析

知道了解决方案,更需要了解问题出现的原因,防止以后遇到类似的错误。
查询QT官方文档
了解到其中关于python dumper的描述如下 :
As the format is not guaranteed to be stable, it is strongly recommended not to generate the wire format directly, but to use the abstraction layer of the Python Dumper classes, specifically the class itself, and the and abstractions. These offer a complete framework to take care of the and fields, to handle children of simple types, references, pointers, enums, and known and unknown structs, as well as some convenience functions to handle common situations.DumperDumper:ValueDumper:Typeinameaddr

When using CDB as debugger backend, you can enable the Python dumper by selecting Preferences > Debugger > CDB > Use Python dumper.
可以了解到,该选项启动python dumper是为了利用额外的工具来抽象化debug时查看的变量类型,使其规范化。由此推测,可能是该工具与CDB存在兼容性问题导致的。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值