-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Milestone
Description
Description
A PR to improve debugging claims debugging added type proxies for ClaimsPrincipal and ClaimsIdentity: #86424
These types aren't sealed, and WindowsPrincipal and WindowsIdentity inherit from them and add new properties. For example, WindowsPrincipal.DeviceClaims. These properties are hidden by the type proxies.
Two possible solutions:
- Remove type proxies. The proxies improve the display of some
IEnumerable<Claims>properties, which I believe could be replaced by placing DebuggerDisplayAttribute on those properties. I haven't seenDebuggerDisplayAttributeused on properties before, but its attribute usage allows it. - Add type proxies for WindowsPrincipal and WindowsIdentity. This would improve debugging of these types, but anyone else who inherits from the base claim types and adds new properties will still have them hidden.
Reproduction Steps
Create WindowsPrinicipal and debug.
Expected behavior
WindowsPrinicipal.DeviceClaims is visible in the default debugging view.
Actual behavior
Only ClaimsPrinicipal properties are visible in the default debugging view.
Regression?
Yes. These properties were visible by default when debugging .NET 7.
Known Workarounds
No response
Configuration
No response
Other information
No response