Issue
I'm currently debugging using the Netbeans debugger. I was just wondering if there is a function where I can set a inactive breakpoint on a variable, the breakpoint is only activated when the value of the variable changes?
Solution
I guess it depends on what language are you using. Invoke Debug
from main menu and then New Breakpoint
. There you can select e.g. Java for language and will have a plenty of ways/conditions on how to specify breakpoint (including field modifications).
Here is a simple ilustration:
Sample code:
public class JavaApplication4 {
public static int something = 2;
public static void main(String[] args) {
for (int i = 0; i < 10; i++) {
System.out.println(i); // this is line #19
something++;
}
}
}
And here are 2 screenshots with possible breakpoints:
Answered By - ladar