Watching an object in the debugger indepedent of current frame

In the debugger, when I put a watch on foo.bar, it seems to evaluate foo.bar in the context of the current stack frame.

When I step into the next function, or otherwise go up or down a frame, all the watches I set up earlier are now useless because there aren't the same local variables in this frame.

I'm interested in knowing when the bar attribute of that particular foo object changes, regardless of where the stack display is focused.

Is there a way for the debugger to put a watch on a particular object, instead of re-evaulating an expression?

Failing that, I'd like to be able to pin watched expressions to evaluate in the context of the frame where they were defined, not the current frame.

Please sign in to leave a comment.