I have a simple decimal class with the following visualizer:
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="awl::decimal<*,*,*>">
<DisplayString>{to_astring()}</DisplayString>
<Expand>
<Item Name="Value">{to_astring()}</Item>
<Item Name="Mantissa">{m_data.man()}</Item>
<Item Name="Exponent">{m_data.exp()}</Item>
<Item Name="Positive">{m_data.positive()}</Item>
<Item Name="Denominator">{m_denoms[m_data.exp()]}</Item>
<Item Name="RawBits">{to_bits()}</Item>
</Expand>
</Type>
</AutoVisualizer>
I added the visualizer to .vsproj:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Natvis Include="Ide\VisualStudio\Awl.natvis" />
</ItemGroup>
...
</Project>
but it does not work.
What is wrong?
Should I add the file to some “Visualizers” group?