How to set a breakpoint when changing variables in Eclipse?

Is there a way, using the eclipse debugger, to interrupt any time when a particular variable is being written?

The only thing I can think of is manually setting a breakpoint at each link, but my code base is several million lines, and I really don't want to do this.

+4
source share
2 answers

You can set the watchpoint to the desired variable. Just click on the line where the variable is declared, and select Run → Toggle Watchpoint .

A watchpoint can be interrupted when accessing a variable, changing a variable, or both.

+3
+1

Source: https://habr.com/ru/post/1568340/


All Articles