Reputation: 21453
Is there a way, using the eclipse debugger, to break any time a particular variable is written to?
The only thing I can think of is to manually set a breakpoint at every reference but my codebase is several million lines and I really don't want to do that.
Upvotes: 6
Views: 9262
Reputation: 72854
You can set a watchpoint at the desired variable. Simply click on the line where the variable is declared, and select Run -> Toggle Watchpoint.
The watchpoint can break on either accessing the variable, modifying the variable, or both.
Upvotes: 6