Track all object references in C#

2019-01-11 11:05发布

Is it possible to list all references of an object, while debugging in Visual Studio. I am using C#. I am looking for something similar to what GC does during garbage collection.

1条回答
手持菜刀,她持情操
2楼-- · 2019-01-11 11:53

SOS can do this for you. It isn't integrated into the debugger, but you can attach it to your running process. You may find it helpful to use SOSAssist, rather than learning the console syntax. IIRC:

!dumpheap –type {type}
查看更多
登录 后发表回答