DebuggerBrowsableAttribute
Another debugger attribute is the DebuggerBrowsableAttribute type, which determines how a member is displayed in a debug window. This attribute is valid for properties, indexers, and fields.
DebuggerBrowsableAttribute has a one-argument constructor only. The parameter is the DebuggableBrowsableState enumeration. Table 15-21 lists the elements of the enumeration.
Table 15-21. DebuggableBrowserState values
Value | Description |
|---|---|
Never | Hides the member in the Debug window. |
Collapsed | Displays the member as collapsed. |
RootHidden | Hides the root member but displays the child elements if the element is an array or a collection. For example, when applied to a property that is an integer array, the integer elements are displayed instead of the ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access