Accepted answer

for a class or instance variable

  1. right-click on the variable in the outline view
  2. select "toggle watchpoint"
  3. then, in the breapkoints view, you can right-click on the resulting entry
  4. select "breakpoint properties"
  5. deselect "field access".


i'm not sure about eclipse, but in intellij idea, you can right click on a break point and add the conditions, just like you would in an if statement. then, the debugger only pauses at the break point if its condition is true.

for instance, in this case it only stops if min == 4.


or toggle breakpoint on the line where the variable is declared, then right-click on the resulting entry, select "breakpoint properties" and deselect "field access".

Related Query

More Query from same tag