How to use out of scope object with in Conditional Breakpoint ?

During debugging of your application, you may need to keep track of some data which are already out of scope. Say, You call a MethodB() from MethodA() and did some operation inside MethodB(), now when you returned  back to MethodA(), all the local variables inside MethodB() are out of scope. But  you want to use them in MethodA(). Now here is the trick, that you can create an ObjectID for an member variables or objects and can track the same when it’s out of scope as well, but until GC() does not collect it.  In this post, I am going to explore how we can use an Out of Scope object value to deal with Conditional Break points. To start with, first you have to understand how to use Object ID to track and out of scope object. Here is my complete article How to track an object which is Out of Scope while Debugging ? . Though I described a quick look into use of out of scope object inside conditional breakpoints on that article,  I received few query about more details on the same. So here I am going to give some more details.

Advertisements