Is there any way to find all references to an object while debugging?
+2
A:
Not without using the profiling/debugger API, as far as I'm aware. (Even with the API, I don't know how to do it.)
Jon Skeet
2008-12-19 09:37:44
A:
Not with the default tools that Visual Studio offers you. There are 3rd party "Memory Profilers" out there that will allow you to do this. I have used one myself to hunt down a "memory leak" in a .NET program.
Vilx-
2008-12-19 09:39:05
+2
A:
If you're willing to dig into WinDbg it is fairly easy to find references to a specific object. However, WinDbg is not the easiest tool to use.
This blog has lots of info on using WinDbg.
Brian Rasmussen
2008-12-19 09:39:33
I'm go to dive into this tool. Thanks.
Sorskoot
2008-12-19 10:17:36
You're welcome - I use WinDbg on a regular basis for managed code. Check out sosex.dll as well (more commands for managed debugging with WinDbg).
Brian Rasmussen
2008-12-19 12:49:11