Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse - Debugging Issue about F5(F5 can not enter method, unless each step is breakpoint.)
Eclipse - Debugging Issue about F5 [message #1773143] Fri, 22 September 2017 07:57
o o is currently offline o oFriend
Messages: 1
Registered: September 2017
Junior Member
F5 can not into method, unless each step is breakpoint.
Eclipse version 3.7, 4.5, 4.7

breakpoint 1 click F5 into breakpoint 2, F5 into breakpoint 3, F5 can not into step1(), unless step1() has breakpoint.
breakpoint 3 click F5 or F6 jumps directly to END

Code:
import org.junit.Test;

public class FrameworkTest {

public static void main(String[] args) {
Framework framework = Framework.getInstance(); // breakpoint 1
System.out.println(framework); // END
}

@Test
public void defaultFrameworkTest() {
Framework framework = Framework.getInstance();
System.out.println(framework);
}
}

public class Framework {

private static final Framework framework = new Framework();

private Framework(){
init(); // breakpoint 2
}

private void init() {
try {
step1(); // breakpoint 3
step2();
} catch (Exception e) {
throw new RuntimeException("Initialize framework fail.", e);
}
}

private void step1() {
System.out.println("step1");
}

private void step1() {
System.out.println("step2");
}

public static Framework getInstance() {
return framework;
}
}
Previous Topic:Resource leak warning for long-lived Autoclosable object
Next Topic:Is it possible to Edit Java Builder ??
Goto Forum:
  


Current Time: Sat Dec 21 15:12:32 GMT 2024

Powered by FUDForum. Page generated in 0.03109 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top