Search code examples
debuggingvisual-studio-2017qt4

Debugging with Qt 4.8.7 in Visual Studio 2017


I have a fairly large project built using Qt 4.8.7.

Up until recently I have ben using Visual Studio 2010 for development and debuging (using the qt add-in).

I have upgraded to Visual Studio 2017 now and am not able to properly, for example, inspect the value of a QString (only partially, like the first letter of the string) anymore.

I tried installing the "new" qt tools thing without success.

Any advice on that topic? Is this even possible with Qt 4.8.7 and VS2017 or do I have to upgrade the whole project to Qt 5 in order to properly debug?


Solution

  • A more detailed answer for people who will pass-by. You can download qt4.natvis from here, and add it to the system-wide Natvis directory (%VSINSTALLDIR%\Common7\Packages\Debugger\Visualizers).