1

There is a possibility to add a watchpoint in the Eclipse, like mentioned e.g. here How to detect when a variable changes value

After invoking the watchpoint, the class which contains watched field is displayed and I am able to see that a setter was called. What I would like to know, is where exactly, in which place in the code, the setter(or constructor) was called.

Czarek
  • 689
  • 9
  • 20

1 Answers1

1

This existing answer suggests that there is no such feature.

But beyond that, there is a simply workaround: use eclipse to find all usages of the method/ctor that sets the thing you are interested in, and then put break points on each of those.

Alternatively, you could put a test in your code under test, to throw exceptions in certain cases, delivering you a nice stack trace containing the call chain.

GhostCat
  • 137,827
  • 25
  • 176
  • 248