I don't know if "In-Memory debugger" is really what I mean, or if it's even possible to produce, but it's the best name I could come up with... Here's the tool I'm looking for:
- Given a variable name, resolve that name to a reference
- Given that reference, be able to watch the object referenced
- Given the watch, be able to visualise it in a useful way, e.g.
- browse the properties of the object as you can in Visual Studio
- be notified when the object referenced is changed.
Here's a use case for this hypothetical tool. I have spent all of today trying to track down an ObjectDisposedException in my C# web app. The object being disposed is the WindowsIdentity of the current user, and there would appear to be a race condition causing the WindowsIdentity to be disposed before it is used. If I could watch a particular memory reference in an intelligent way, rather than a variable in some given scope, I think it would help me pin down the source of this sort of bug more easily.
Does such a tool exist for .NET?