gopal raghavan
gopal raghavan

Reputation: 41

VSCode Accessing Local Created Variable in Natvis

I have the following natvis code for visualizing my q23_t class (part of a larger natvis file) in the debugger.I cannot get natvis to show the value of ibit23 which is a locally defined variable. I get the following error:
-var-create: unable to create variable object
I want to know how to declare a local variable and access it for my project. Thanks much.

<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
  <Type Name="q23_t">
    <DisplayString> "A" </DisplayString>
    <Expand>
            <Variable Name="ibit23" InitialValue="11" />
            <Item Name="[local]"> ibit23 </Item>
     </Expand>
  </Type>
</AutoVisualizer>

Upvotes: 1

Views: 36

Answers (0)

Related Questions