I would like to use a .natvis file to display all of the elements in a tree structure as a flat list.
I'm aware of the TreeItems expansion described in the .natvis documentation, and have tried to use that, but it seems a bit limited, and difficult to get to work in my situation (Templated node types, nodes which don't contain the actual data, need to cast the nodes to other templated types to get the data, lack of ability to do Exec entries or multiple Items per tree node, etc.)
The CustomListItems expansion is a lot more flexible in terms of being able to assign variables and execute commands which are evaluated in a loop. But I'm struggling to figure out whether there's a way to explore a tree in CustomListItems. Basically there would have to be some way to maintain a stack of some kind so that I could explore the entire left branch and then pop back up and explore the right branch. Is there any way to do this in CustomListItems?