7

I'm using VS Ultimate 2012 Update 5 :

  • Microsoft Visual Studio Ultimate 2012
  • Version 11.0.61219.00 Update 5
  • Microsoft .NET Framework
  • Version 4.5.50938

... and try to use/install natvis to get user defined debugger variable vizualisations.

I did every hints provided in MSDN or StackOverflow (like creating EnableNatvisDiagnostics in registry, or advice in https://msdn.microsoft.com/fr-fr/library/jj620914%28v=vs.110%29.aspx)

Nothing works.

Any idea ? Regards. Alain aka BDW

BartmanDilaw
  • 398
  • 4
  • 15

3 Answers3

5

For me I had to turn off Use Native Compatibility Mode in the Debugger Options. None of these other suggestions worked up until that point. So my advice is experiment with these debugger options until the natvis works as there's no one-size-fits-all solution here.

Rob Baker
  • 51
  • 1
  • 2
  • For me, natvis definitely did NOT stop working until some time AFTER I had turned this option on. But turning it off fixed natvis immediately. ¯\\_(ツ)_/¯ – Overlord Zurg Sep 14 '17 at 19:49
  • me too. VS2015. I had to disable 'Use Native Compatibility Mode'. Natvis was working ok before and don't ever recall enabling or disabling that setting before. – edwinc Aug 03 '18 at 12:51
  • Fixed it for me, too! I never changed this setting... Thank you – JSilver Apr 13 '22 at 09:10
3

I was experiencing similar problems in VS2015. Suddenly all of my visualisers stopped working.

With reference to this post: User defined natvis files in Visual Studio 2012 - in my case, "Show raw structure of data objects in variables window" was turned off. Checking it seemed to get VS to start loading the Natvis files again.

I also turned off "Use Managed Compatibility Mode" and "Use Native Compatibility Mode" for good measure, as I'd checked these options around the time that visualisers stopped working for me.

Community
  • 1
  • 1
Coder_Dan
  • 1,815
  • 3
  • 23
  • 31
  • It would be nice if locations of these setting are shown (e.g. project properties > ... ). – javaLover Apr 13 '17 at 08:34
  • Tools > Options > Debugging > General – Jeff Lamb Apr 26 '17 at 00:07
  • I suspect it was the "Use Native Compatibility Mode" as mentioned by @rob-baker. I had a user with this issue, and I could reproduce it by turning on Native Compatibility Mode and fix it by turning it off again. – Ian Brockbank Feb 11 '21 at 09:18
3

You can enable natvis debugging directly in Visual Studio in:
Tools -> Options -> Debugging -> Ouput Window -> Natvis diagnostic messages (C++ only)
It works in Visual Studio 2015 - 2019 (at least).

(Since Visual C++ 2015 EnableNatvisDiagnostics registry setting is not used.)

Zbyl
  • 2,130
  • 1
  • 17
  • 26