eb80
eb80

Reputation: 4738

Eclipse debugger not stoping Java 1.6.0

While this question has been asked repeatedly, the current answers just are not working for me.

Things tried thus far:

-- starting in Debug perspective
-- upgrading version of Eclipse
-- trying to clean out Eclipse.ini (cannot find a version of eclipse.ini)
-- checking for "skip all breakpoints" being checked (it is not checked)
-- Run > Debug Configurations, that 'Stop in main' is selected

The Java runtime version is:

1.6.0_65-b14-462-11M4609
Eclipse Version: "Version: Kepler Service Release 1"
Eclipse Build: "Build id: 20130919-0819"

Here is my code (its very simple)

public class Main {
  public static void main(String[] args) {
    // breakpoint set here
    System.out.println(System.getProperty("java.runtime.version"));
  }
}

Question: Why does Eclipse not stop when I put in a breakpoint?

Upvotes: 0

Views: 73

Answers (1)

Tony K.
Tony K.

Reputation: 5605

One more thing to look at is if you are setting the breakpoint on the right thing.

If you are using dependency management (e.g. Maven), then it is not unheard of for you to get two different versions of the same class brought in from two different places. Then you might open a resource, set a breakpoint on it, but run the other version.

Another possibility is for something like Maven to put the JAR of a checked-out project on the classpath, leading to you setting a breakpoint on the class that is in the output folder, but running the one from the JAR.

If you are using a servers view (e.g. running in Tomcat), similar things can happen due to the deployment assembly (in the project properties).

There are many ways you can end up with this problem, but most of them boil down to not setting the breakpoint on the thing you are actually running.

Upvotes: 1

Related Questions