Visual Studio natvis and incomplete types

I am writing a natvis file for a project in which some structures are defined "privately", that is, in .c code files, not headers.

When I debug a module where structs are defined, the debugger picks them up, but when working with pointers to those structs in other modules, I lose all the internal details and see instead {...}

. I can get around this by specifically hovering the object over the structure name specified in the module, for example. (MyModule.dll!MyStruct*)MyPointer

and that's ok for general development. But when writing the natvis files it got hurt.

I can create an item ExpandedItem

to display a properly selected object. But I really want to make a few items Item

that select key variables, and if I do, then I'm stuck with "Raw View" giving me only {...}

. Attempts to do both of these things at once lead to recursion. It's also very ugly to pour a lot this

in the natvis file.

Can I tell the debugger to recognize the complete type definition on its own?

+3


source to share





All Articles