Skip to content

Natvis for Corrade types #111

@Squareys

Description

@Squareys

For displaying Container types more conveniently when debugging in Visual Studio, I created a very very rudimentary .natvis file:

<?xml version="1.0" encoding="utf-8"?> 
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
  <Type Name="Corrade::Containers::Array&lt;*&gt;">
    <DisplayString>{{ size={_size} }}</DisplayString>
    <Expand>
      <ArrayItems>
        <Size>_size</Size>
        <ValuePointer>_data</ValuePointer>
      </ArrayItems>
    </Expand>
  </Type>
  <Type Name="Corrade::Containers::ArrayView&lt;*&gt;">
    <DisplayString>{{ size={_size} }}</DisplayString>
    <Expand>
      <ArrayItems>
        <Size>_size</Size>
        <ValuePointer>_data</ValuePointer>
      </ArrayItems>
    </Expand>
  </Type>
</AutoVisualizer>

Make sure to add it to your CMake project's sources so that Visual Studio picks it up.

Also, see the Documentation of NatVis.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions