4

I'm writing a natvis file for a project where some structs are defined "privately", that is to say in .c code files rather than headers.

When I'm debugging the module within which the structs are defined the debugger picks them up, but when dealing with pointers to those structs in other modules I lose all internal details and see {...} instead. I can get around this by specifically casting the object to the module-qualified name of the struct, e.g. (MyModule.dll!MyStruct*)MyPointer, and that's OK for general development work. But it has become painful when writing natvis files.

I can create an ExpandedItem element to display the correctly-cast object. But what I really want to do is have multiple Item elements which pick out key variables, and if I do that then I'm stuck with "Raw View" giving me just {...}. Attempts to do both things at once lead to recursions. It's also really ugly having to cast this a lot in the natvis file.

Can I prompt the debugger to recognise the complete type definition by itself?

Artfunkel
  • 1,832
  • 17
  • 23

0 Answers0