Reputation: 975
Is there a tool in Visual Studio allowing to check how many instances of a given class was created during debugging (without editing a code)?
Upvotes: 0
Views: 1721
Reputation: 1297
Bit late to the party, but this question ranks high in the Google and I found a way to show instances in VS.
Once you hit a breakpoint in the Diagnostic Tools (Ctrl+Alt+F2) select Memory Usage tab. Click Take Snapshot button and when it's done click View Heap. You will see instantiated objects, count, memory usage etc.
Upvotes: 1
Reputation: 1047
You can use SOS library on windbg debugging tool. There is a good tutuorial in below link. You can list objects with '!Dumpheap' command
Edit: blog link was lost, I've updated with a good one
Upvotes: 1