EDIT : see also this answer .
I have not tried, but from the documentation you can apply this attribute at the assembly level. Therefore, theoretically, you can do something like this:
[assembly: DebuggerDisplay("{Key,nq}: {Value,nq}", Target = typeof(KeyValuePair<int, SomeClass>))]
I would be surprised if this allows you to get away indicating Target , which is an open generic type, for example. Target = typeof(KeyValuePair<,>) , which will work for KVP of any type. But if you need it, it's worth a try!
source share