Debugging: Monitor at which lines a variable changes
Hi there, so I was wondering if this is possible in IntelliJ IDEA: Select a variable from the variables pane of the debugger and automatically set breakpoints to all the lines where said variables potentially getting changed.
I would also consider any alternative way to see at which lines one selected variable changes as equally valuable.
Background story: I was working on a decently complicated university assignment and my code had a bug where - despite not being intended to - one of my ArrayLists inside my main ArrayLists just emptied itself and lead to an IndexOutOfBoundsException: Index 0 out of bounds for length 0.
Searching for the exact cause and therefore bug location manually took me only a few minutes, fortunately, but for bigger and more complex projects I would highly prefer an automated way of doing so.
Warm Regards
Thomas Fritz
Please sign in to leave a comment.
It's possible for fields, see https://www.jetbrains.com/help/idea/using-breakpoints.html#field_watchpoint .