Lets say I have an object:
[DebuggerDisplay("Bar={bar}")]
public class Foo
{
public String bar{get;set;}
}
When I have a single instance of bar the debugger correctly shows Bar="value of bar"
but when I have a dictionary of Foo
s, the dictionary shows:
{[key, namespace.Foo]}
when I expand the kvp I get the expected debugger display string.
When I override ToString()
in Foo
and have a dictionary of Foo
the dictionary shows:
{[key, Bar="value of bar"]}
According to the documentation, ToString()
is only used for debugger display if a DebuggerDisplay
Attribute doesn't override it...
How do I get the debuggerDisplay attribute to override the debugger string in enumerated situations in addition to single instances?