Is there a way to determine if Eclipse has reach the breakpoint then change the variable value?
For example
public class Test {
static boolean isDebug = false;
static void A() {
System.out.println(isDebug);
}
static void B() {
System.out.println(isDebug);
}
static void C() {
System.out.println(isDebug);
}
public static void main(String args[]) {
A();
B();
C();
}
The result would be:
false
false
false
What I need is the
static boolean isDebug = setTrueIfBreakpointWasHit;
So when if I set breakpoint on the B(); method the result would be:
false
true
true
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.