-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
After linking an application, any type that is used by a DebuggerTypeProxyAttribute still exists, but is empty. This is because there are no callers of any of the members on these types - they exist so the debugger can call them to show in the Watch window. So the linker is removing all of the members from the type. But the type remains because it is being referenced by the DebuggerTypeProxyAttribute. This will limit the ability to debug a linked application, because any type that uses a DebuggerTypeProxy will be empty in the Watch window.
We should fix this by annotating the DebuggerTypeProxyAttribute class to tell the linker to preserve its members that are required by the debugger. My initial thinking is that includes PublicConstructors and PublicProperties, as I don't think the debugger will call any methods on the proxy type.