@[TOC]((ubuntu)QTcreator debugger std::string类型数据调试显示<无法访问>)
原链接: QtCreator debugger does not display values of std::string.
1.找到qtcreator目录下/qtcreator/debugger/stdtypes.py文件,例如路径:/Qt5.9.0/Tools/QtCreator/share/qtcreator/debugger,右击在终端中打开。
2.输入
sudo vim stdtypes.py
3.找到
def qdumpHelper_std__string(d, value, charType, format):
4.修改
(1)将
(size, alloc, refcount) = d.split("ppp", data - 3 * d.ptrSize())
改为:
(size, alloc, refcount) = d.split("ppp", value.address() + d.ptrSize())
(2)将
d.check(0 <= size and size <= alloc and alloc <= 100*1000*1000)
<