Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Track all object references in C#

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.

like image 936
Faisal Mansoor Avatar asked Apr 01 '09 21:04

Faisal Mansoor


1 Answers

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}
like image 74
Marc Gravell Avatar answered Sep 23 '22 14:09

Marc Gravell