+1

Create ObjectId for instances and persist it on expressions between debug sessions

codekaizen 8 years ago updated by Omer Raviv 8 years ago 1
I want to be able to track instances at debug time, much like the existing VS "Make Object Id" allows me to do. However, I'd like the Object ID to be recreated each debug session for instances which are created given a specific expression and runtime code path.

Thanks you for your request. I can definitely see the need for a "persisted watch list" as you describe, that persists expressions as text between debug sessions and even after you close Visual Studio. The main deterrent we might have from implementing such a feature is that it would only work well for expressions that access data through a static class (ie, successfuly evaluating them does not depend on debug context), and that might be confusing to the novice user.


As for automatically recreating an Object ID on the persisted expressions automatically, I think there are a couple of problems: (1) Since we can only Make Object ID on the first time the user breaks in the debugger, the moment in which we do it might differ from debug session to debug session, and this could lead to a lot of confusion. (2) It'll be a little inconsistent, because Make Object ID only works on reference types, and would fail on value types.


So in light of this, I think it might be best if we implement this idea but without automatically making object IDs, and seperately implement Julien Lebosquain's idea for a "Tracked References" window. Does that make sense to you?