Add DebuggerDisplay Attribute
This code generation applies to:
- C#
What: The DebuggerDisplay Attribute controls how an object, property, or field is displayed in the debugger variable windows.
When: You want to pin properties within the debugger programmatically in your code.
Why: Pinning properties allows you to quickly inspect objects by their properties by bubbling up that property to the top of the object's property list within the debugger.
How-to
Place your cursor on either a type, delegate, property, or field.
Press Ctrl+. to trigger the Quick Actions and Refactorings menu and select Add DebuggerDisplay attribute.
The DebuggerDisplay attribute will get added along with an auto method that returns the default ToString().
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for