Description
DebuggerDisplayAttribute
is a nice little thing to add to classes -- properly written, they make the debugger a bit less obnoxious to use by putting some important information about an instance front and center. At the same time, it would be nice if we could possibly avoid having to write all those ourselves, piecemeal.
CSharpApi.cs
is geneated from the code in CSharpApiGenerator.cs
. It may be a simple matter to enhance that code to attach a DebuggerDisplay
attribute to the generated classes. The configuration objects have their properties and documentation derived from the ArgumentAttribute
. We needn't display everything: In other contexts, we have distinguished important vs. more unimportant "advanced" parameters by ArgumentAttribute
's SortOrder
property. We could exploit that for this purpose as well, and only include in the display formatted string those parameters with that property set and of course only those types that would display well there anyway.