简体   繁体   English

Visual Studio 和 Natvis 不工作

[英]Visual Studio & Natvis not working

I'm using VS Ultimate 2012 Update 5 :我正在使用 VS Ultimate 2012 更新 5:

  • Microsoft Visual Studio Ultimate 2012微软视觉工作室终极版 2012
  • Version 11.0.61219.00 Update 5版本 11.0.61219.00 更新 5
  • Microsoft .NET Framework微软 .NET 框架
  • Version 4.5.50938版本 4.5.50938

... and try to use/install natvis to get user defined debugger variable vizualisations. ...并尝试使用/安装 natvis 来获取用户定义的调试器变量 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 )我做了 MSDN 或 StackOverflow 中提供的所有提示(例如在注册表中创建 EnableNatvisDiagnostics,或在https://msdn.microsoft.com/fr-fr/library/jj620914%28v=vs.110%29.aspx 中创建建议)

Nothing works.没有任何效果。

Any idea ?任何的想法 ? Regards.问候。 Alain aka BDW阿兰又名BDW

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. 所以我的建议是试验这些调试器选项,直到natvis工作,因为这里没有一个通用的解决方案。

I was experiencing similar problems in VS2015. 我在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. 参考这篇文章: 在Visual Studio 2012中用户定义的natvis文件 - 在我的例子中,“在变量窗口中显示数据对象的原始结构”被关闭。 Checking it seemed to get VS to start loading the Natvis files again. 检查它似乎让VS再次开始加载Natvis文件。

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. 我还关闭了“使用托管兼容模式”和“使用原生兼容模式”,因为我在可视化工具停止为我工作的时候检查了这些选项。

You can enable natvis debugging directly in Visual Studio in:您可以直接在 Visual Studio 中启用 natvis 调试:
Tools -> Options -> Debugging -> Ouput Window -> Natvis diagnostic messages (C++ only)
It works in Visual Studio 2015 - 2019 (at least).它适用于 Visual Studio 2015 - 2019(至少)。

(Since Visual C++ 2015 EnableNatvisDiagnostics registry setting is not used .) (由于未使用Visual C++ 2015 EnableNatvisDiagnostics注册表设置。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM