public class Breakpoints {
int field1; // watchpoint - suspend when field1 is read
int field2; // watchpoint - suspend when field1 is written
int field3; // watchpoint - suspend when field1 is read or written
public void method() {
int x;
x = 10; // suspend before this line is executed
x = 11; // same as above but this breakpoint is temporarily disabled
for (int i = 0; i < 100; i++) {
x = i; // conditional breakpoint - suspend when i==5
}
}
}
一旦你在断点视图(Window | Show Viev | Debug | Breakpoints)中选择了 Skip All Breakpoints,所有的图标都会变成对角线,如下所示: