microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
817 stars 217 forks source link

Support for HideRawView on Expand node #1458

Open ookami125 opened 4 months ago

ookami125 commented 4 months ago

I'm currently building a compiler and it would be nice to hide the raw views so I can hide the duplicate info. This is supported on Visual Studio, so this is a request for feature parity.

My current natvis looks similar to this which makes all DataTypes produce 2 RawViews for every single variable.

<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
    <Type Name="DataType">
        <DisplayString>{{{type}}}</DisplayString>
        <Expand HideRawView="1">
            <ExpandedItem Condition="type == DataType::INT">(DataTypeInt*)this,nd</ExpandedItem>
        </Expand>
    </Type>
    <Type Name="DataTypeInt">
        <Expand HideRawView="1">
            <Item Name="type">type</Item>
            <Item Name="castable">castable</Item>
            <Item Name="constant">constant</Item>
            <Item Name="Width">Width</Item>
            <Item Name="Signedness">Signedness</Item>
        </Expand>
    </Type>
</AutoVisualizer>