Sponsor: Using RabbitMQ or Azure Service Bus in your .NET systems? Well, you could just use their SDKs and roll your own serialization, routing, outbox, retries, and telemetry. I mean, seriously, how hard could it be?

The DebuggerDisplayAttribute Class controls how an object, property, or field is displayed in the debugger variable windows. This attribute can be applied to types, delegates, properties, fields, and assemblies. The DebuggerDisplay attribute has a single argument, which is a string to be displayed in the value column for instances of the type. This string can contain braces ({ and }). Text within a pair of braces is evaluated as a field, property or method.
Example
So here I’m going to have a Person class. I’m going to define the attribute to show the firstname and lastname. Now when we debug, this is the result when we look at the new person instance.
Best Practice?
In most open source projects, it appears one of the practices many employ is creating an internal DebuggerDisplay that returns the relevant string you want to display. Notice the “nq” in the DebuggerDisplay Attribute, this is to simply say “No Quotes”. Here is the resulting output: