Hi Guys,
I am checking the amethyst/legion crate and it is really great. However, I have a challenge in debugging it. In my code, there are many places I will have below if let,
if let Some(entry) = world.entry(entity) {
let position = entry.into_component::<Position>().unwrap();
println!("{}", position.x);
}
If I visualise entry using debugger, it shows the raw data like below and I have to declare a temperory variable position to know the values in this entry. This is quite challenging because I am working on a huge simulator and using println! is less productive.

Hence, I thought of writing my own Natvis for visualisation but it is not working ![]()
<Type Name="legion::internals::entry::Entry">
<DisplayString>{{ Selva }}</DisplayString>
<Expand HideRawView="true">
<CustomListItems>
<Variable Name="i" InitialValue="0" />
<Variable Name="n" InitialValue="world->components.storages.base.table.items" />
<Size>world->components.storages.base.table.items</Size>
<Loop>
<Break Condition="n == 0" />
<!-- This if condition need to be modified to show only items of this entry -->
<If Condition="(world->components.storages.base.table.ctrl.pointer[i] & 0x80) == 0">
<Exec>n--</Exec>
<Item>((tuple<$T1, $T2>*)world.components.storages.base.table.ctrl.pointer)[-(i + 1)].__0.name.type_id.t</Item>
<!-- <Item>((tuple<$T1, $T2>*)world->components.storages.base.table.ctrl.pointer)</Item> -->
</If>
<Exec>i++</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
I think the storages stored as HashMap is not visualised correctly (with or without my Natvis). I feel it is due to custom hasher they use, HashMap< ComponentTypeId, Box<dyn UnknownComponentStorage>, BuildHasherDefault<ComponentTypeIdHasher>.

Can someone help me on how I can modify this Natvis to show this HashMap?
Note: My custom natvis file is based on the natvis in Rust git repo.


