How to set Eclipse watchpoint to activate when object/primitive changes?

后端 未结 1 769
走了就别回头了
走了就别回头了 2021-02-09 14:51

I\'m trying to refactor some rather horrible code at the moment. It\'s passing around objects in a very convoluted manner I can\'t keep track of and apparently directly accessi

相关标签:
1条回答
  • 2021-02-09 15:12

    You can set a watchpoint on each field of the class you are interested in.

    Alternatively, you can find all places in the source referring a certain field by using the call hierarchy (click on the field, and press Ctrl-Alt-H). This has the advantage that you are not only finding where the field is accessed in a particular execution of the program, but for all possible executions.

    Note that neither method will notice if the field is accessed using reflection.

    0 讨论(0)
提交回复
热议问题