-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NatVis IncludeView
and ExcludeView
are ignored
#232
Comments
This is a known issue -- views are presently "unsupported" in WinDbg though this is something we may eventually come back and revisit in part. At the time adopted NatVis into WinDbg, it was pretty much a visualization only technology within Visual Studio (e.g.: you couldn't put expressions like foo[5] or foo.bar in watch/locals if the container notion or the name "bar" were provided by NatVis). WinDbg made NatVis part of its data model. Anything which was added by NatVis was programmatically accessible on the object -- meaning that you could index the container or access keys in locals/watch... or pass that object to a JavaScript script and have it do similarly. The original thought was that views would (eventually) not alter the SEMANTIC meaning of any object or its fields -- just be a "filter" which changes how they are DISPLAYED. In that vein, today, we take all the views and "glom" them together into one object. We haven't gone back and done that "filtering" notion... to say nothing of the few visualizers which have different SEMANTICS depending on the ,view(...) which is applied... |
I see, thanks for the explanation. Regardless of whether the outcome changes, I appreciate knowing the reasoning and history. |
I'm encountering the same issue and have been reviewing the documentation. From what I see, the debugger engine and debugger data model seem to be highly extensible. @wmessmer-msft Could you please advise whether I am correct in understanding that this issue cannot be resolved by implementing a custom data model (registered via Thanks in advance! |
This works properly in Visual Studio, but it is not working in WinDbg.
This problem doesn't just manifest itself in custom types. This is an issue with standard library types that use
IncludeView
andExcludeView
, such asstd::unordered_set
. In the example below:bucket_count
,load_factor
, andmax_load_factor
should not be displayed, since STL.natvis annotatedIncludeView="detailed"
allocator
because one of them should not be here. It's annotated withExcludeView="simple"
, and this subobject is called with<ExpandedItem>_List,view(simple)</ExpandedItem>
, so it shouldn't be displayed.Here is a self-contained boiled-down example without any std lib includes.
Breaking in the
main
function, I would expect thes
to show different items for different views, according to what I named them here. Instead, this is my output.Similar behaviour also seems to happen when using
IncludeView
andExcludeView
on<Type>
elements. As far as I can tell, the problem isn't limited to these attributes on<Item>
elements.Thanks
The text was updated successfully, but these errors were encountered: