我正在使用 Visual Studio 2015 和 Qt5。
我已经在 Vislaualizers 文件夹中添加了 qt5.natvis。我在工具 > 选项 > 调试 > 常规菜单中设置了“使用本机兼容模式”选项。
即使这样,调试时 QString 值也不会正确显示。Locals/Autos/Watch 窗口上仅显示内存方向。任何想法?
我已经为本机诊断消息设置了详细选项,这就是我得到的:
Natvis: Parsing natvis xml file: D:\<user_name>\Documents\Visual Studio 2015\Visualizers\qt5.natvis.
Natvis: Fatal error:
Natvis: Parsing natvis xml file: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\PythonDkm.natvis.
Natvis: Fatal error:
Natvis: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\qt.natvis(128,25): Error: a pointer to a bound function may only be used to call the function
Error while evaluating 'd->data,sub' in the context of type '<executable>!QString'.
Natvis: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\qt.natvis(127,6): Ignoring visualizer for type 'QString' labeled as 'QString' because one or more sub-expressions was invalid.