Skip to content
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

IEnumerable Visualizer shows properties that are marked with attribute to hide them in the debugger #108

Open
RobertvanderHulst opened this issue Dec 14, 2023 · 1 comment

Comments

@RobertvanderHulst
Copy link

RobertvanderHulst commented Dec 14, 2023

We have added IEnumerable Visualizer support for some of our own collection types.
One of these collections contains values of an internal type (like the COMVariant Type) and we have marked several properties that are for internal use with [DebuggerBrowsable(DebuggerBrowsableState.Never)].
The IEnumerable Visualizer still shows these properties.
We have also tried to work around this by adding a DebuggerProxy for that type, but the Visualizer ignores that.
Is there a way to control which fields and properties are shown by the IEnumerable Visualizer ?

@gregg-miskelly
Copy link
Member

The custom visualizer mechanism is currently entirely different from the way expression evaluation works. It works by injecting a dll into the target process and running whatever code the custom visualizer wants. In the case of the IEnumerable visualizer, this is a bunch of reflection calls to inspect the object that way.

All that said, respecting [DebuggerBrowsable(DebuggerBrowsableState.Never)] make lots of sense to me. I will open a Visual Studio bug for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants