I used to google a lot about it.
Visual Studio 2013\Visualizers
but so far nothing helps...
I know this question is a while back but if relevant, for VS 2013 then go to
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Packages\Debugger\Visualizers"
and add Code from below link in a text file and name it qt5.natvis. For VS 2019 the location would be:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Packages\Debugger\Visualizers"
Hope this helps.
pastebin code for seeing qt variables in visual studio
There is an explicit, native MSVC solution without the use of plugins etc.: see my answer from here
Say you have QString str
, then add to the debugger session watch window:
Qt4:
((str).d)->array,su
for Qt5 it's slightly more complicated:
(char*)str.d + str.d->offset,su
I search this problem's answer for a long time, and final success saw the QString content by try check/uncheck mentioned options. Hope can help others.
display qstring content
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With