简体   繁体   English

Armadillo的自定义natvis文件仅适用于resharper

[英]Custom natvis file for Armadillo only works with resharper

I created a custom visualizer file (.natvis) for Visual Studio (17.7.4) in order to be able to see data inside Armadillo containers. 我为Visual Studio(17.7.4)创建了一个自定义可视化文件(.natvis),以便能够查看Armadillo容器中的数据。

The custom visualization only works when hovering over the variable and when ReSharper(2018.3.2) is enabled. 自定义可视化仅在将鼠标悬停在变量上并且启用了ReSharper(2018.3.2)时才有效。 If I open up the Locals window or add a Watch the custom visualization is not shown (with or without ReSharper being enabled). 如果我打开“本地”窗口或添加“监视”,则不会显示自定义可视化(启用或不启用ReSharper)。

According to this post Is there a way to print an Armadillo matrix or vector in Visual Studio Debug? 根据这篇文章有没有办法在Visual Studio Debug中打印犰狳矩阵或向量? the natvis file is working. natvis文件正在运行。

Another related link. 另一个相关链接。 customize multi-dimension array debugging in visual studio 2015 with .natvis file 使用.natvis文件在visual studio 2015中自定义多维数组调试

It turns out that the .natvis file was being loaded and parsed correctly according to the natvis diagnostics output. 事实证明,.natvis文件正在根据natvis诊断输出正确加载和解析。 The reason why the custom visualization was only working when hovering over the variable (a ReSharper feature) and not in the output variables window was due to a debugger setting, Debug -> Options -> General -> Show raw structure of objects in variable windows. 自定义可视化仅在将鼠标悬停在变量(ReSharper功能)而不是输出变量窗口时才起作用的原因是调试器设置,调试 - >选项 - >常规 - >显示变量窗口中对象的原始结构。

I tried implementing the suggestions in this post, namely the part about turning on the "Show raw structure of objects in variable windows" option. 我试图在实施建议这个职位,即约“可变窗口对象的显示原料结构”选项开启的一部分。 As suggested in the post, turning that feature on and off might work. 正如帖子中所建议的,打开和关闭该功能可能会有效。 I ended up restarting my computer and set that option to off . 我最终重新启动计算机并将该选项设置为关闭 This fixed my issues, and I was able to see the custom visualization in the variables window and when hovering over the variable. 这解决了我的问题,我能够在变量窗口中以及将鼠标悬停在变量上时看到自定义可视化。

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

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