View Full Version : QString is not shown properly in Watch (Qt Add-in 1.1.5 for Visual Studio 2008)

10th August 2010, 21:39
Hi, when I debug in VS2008, the string in QString is only automatically shown in the Locals window. But the string is not shown in Watch and Autos, as well as when I point a QString with mouse.

Is this normal? Or some setting is wrong?

I have checked the autoexp.dat (C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\autoexp.dat) file but can't find anything unusual.


Environment: Visual Studio Team System 2008, Qt Add-in 1.1.5, Qt 4.7 beta2, Windows 7 Ultimate 64-bit


11th August 2010, 05:31
I don't know if you can change it, but yes, that is normal.
When you try GDB on linux for example, it will also give you the address of the QString object. To see the actual string, you need to print the data member.

Debuggers don't know what QString is. So you need to tell the debugger explicitly what to show (like in your locals view)

12th August 2010, 02:55
Thanks. But I just found out that my other machine shows the string in QString automatically in Autos, Locals and Watch.
The contents of both autoexp.dat are the same.

For the machine that didn't work, I had to add this after [AutoExpand] in autoexp.dat:


I understand that if an entry exist in both [AutoExpand] and [Visualizer], the Visualizer entry will override the AutoExpand entry. I think something is blocking the QString Visualizer to work in Watch and Autos. But that something is not blocking it to work in Locals.

12th August 2010, 13:20
The problem is solved. Did a /resetuserdata and all QString are shown properly now.
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /resetuserdata