Skip to content

DebuggerTypeProxy types are empty after linking #37307

@eerhardt

Description

@eerhardt

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.

cc @vitek-karas @joperezr @layomia

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions