开发者

Eclipse -- Long Shot Debugging Request -- Possible to put a watch on every variable

开发者 https://www.devze.com 2023-01-30 09:39 出处:网络
Need to figure out where a key string is being set. I want to tell Eclips开发者_Python百科e to stop, as if on a breakpoint, as soon as a variable is set to something, say \"key_value_here\"?

Need to figure out where a key string is being set.

I want to tell Eclips开发者_Python百科e to stop, as if on a breakpoint, as soon as a variable is set to something, say "key_value_here"?

This isn't possible is it? :P


Your question is not exactly clear, but if i understand what you mean it is possible:
If this is a field in a class, set the breakpoint on its declaration. the right click on the breakpoint will allow you to edit breakpoint properties. there you can choose access or modification break.
Hope this helps.


I am not sure if eclipse offers a "conditional watch point". If it does, that solves your problem nicely. If not, you can set a conditional breakpoint on each line that assigns the variable in question.

0

精彩评论

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