Hassan
Hassan

Reputation: 313

Debugger tool for VS, that let me watch the object, not the reference

I m looking for an add-on/tool of visual studio that let me do advanced debugging. specifically, i want to watch an object, what ever the reference is, and get a break when a property change for example.

now VS let me watch the reference, and make condition on breakpoints

in other words, something where i can specifies a reference , and the tool watch the object not only the ref.

thanks

Upvotes: 3

Views: 558

Answers (1)

Omer Raviv
Omer Raviv

Reputation: 11827

I think what you're looking for is Make Object ID

As for your 2nd request, of breaking whenever a property changes, that's what's called a Data Breakpoint in C++, and is not supported in managed code. The best you can do is put a breakpoint in the property setter (or, if it is a field or an auto property, turn it into a regular property with backing field, recompile, and then put a breakpoint on the setter.

If you want to break only when the specific object changes, you can put a Condition on your breakpoint, such as "this == 1#", where 1# is the ObjectID of the object you are trying to track for changes, and then it will break only when the property of that specific object is changed.

Upvotes: 6

Related Questions