views:

74

answers:

1

When debugging you can tag an object with "Make Object ID" so you can follow instances of the object through the call stack and object graphs. Is there any way to see a list of all objects that you've tagged regardless of the current stack and local variables?

+1  A: 

There is no way to do this in C#. The best you can do is to go down the list object ids (numerically top to bottom) and see which ones point to valid objects.

You can add each item you want to watch by ID# to one of the debug watch lists (Debug | Windows | Watch | Watch 1).

JaredPar
What list of object ids?
Paul Alexander
@Paul, they are allocated numerically so just start at 0 and go till you hit invalid ones. although it is possible for them to get deleted and the id probably won't get re-used.
JaredPar
But where is the list? Locals? Auto?...?
Paul Alexander
@Paul either the watch or immediate window. Just type in the ID. The syntax is escaping me at the moment but I believe for C# it's 1#,2#,etc ...
JaredPar
Ahh...didn't realize you could watch an object id explicitly. Sweet, this does exactly what I need.
Paul Alexander