开发者

global watch of object instance

I try to watch object's property values. Is it possible to have some kind of a global watch, the one that doesn't depend on visibility scope

for example one method is somewhere in a callstack, it receives an object does something to it, and then control flow goes to undebuggable zone where I can't step through code, and then after some time control flow comes back to the place where I can step through code, but I don't know now where is my object that was given to someMethod (but I am sure that object is alive and is stored in a filed of an instance of a class). Are there something like an address (like address in memory) using which I could find watch object in Expressions panel in Eclipse?

cal开发者_如何学运维l stack:

someMethod(Object o)
<undebuggable zone>
someOtherMethod

What i want is to watch object o when I am in someOtherMethod


I think you need "public static" entity.

You can create test public class with public static fields. Set your object into one of its field and you can see this objects value everywhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜