unable to place breakpoints in eclipse

21,444

Solution 1

Try to take a look at your configuration Java->debug->Step filtering sometime its enabled and you cannot stop inside a filtered package

Solution 2

When trying at add breakpoints for a .jsp page it turned out the page was not opened with a JSP editor, which prevented the setting of breakpoints.

Solution 3

It sounds like Eclipse cannot find the jar file on the classpath, although you did say that the jar file is part of the project. What happens if you run the application normally? Do you get a ClassDefNotFoundException or something similar?

If you check the tabs on the Run/Debug configuration you should be able to see what paths and jar files are on the classpath at runtime. You can also add jar files that are not needed to build the application but are needed to run it.

Solution 4

Use a plugin called Jadclipse to decompile the jar in runtime, place the breakpoint at the point where the JAR method is invoked, then press F6 and you should be able to go into your JAR method.

Solution 5

I m aware of a bug in eclipse where break points dont work with a specific version of jdk 1.6.x For more info look at here

Share:
21,444
malifa
Author by

malifa

sdfsdfsdf sdf sdfsdfsdsdsdfsdf sdfdsfsdsdfssdfsd

Updated on March 18, 2020

Comments

  • malifa
    malifa about 4 years

    I am using eclipse europa (3.5) on windows vista home premium 64-bit using JDK 1.6.0_18 (32 BIT).

    Normally, I am able to put breakpoints just fine; However, for a particular class which is NOT part of the project (this class is inside a .JAR file (.JAR file is part of the project) ), although I have attached a source directory to this .JAR file, I am unable to place a breakpoint in this class.

    If I double-click on the breakpoint pane(left border), I notice that a class breakpoint is placed. I was wondering if there was NO debug info; However, found that this particular class was compiled using ant/javac task using debug="true" and debuglevel="lines,vars,source". I even ran jad on this class to confirm that it indeed contained the debug info.

    So, why is eclipse preventing me from placing a breakpoint ?

    EDIT : Just so everyone understands the context, this is a webapp running under tomcat 6.0. I am remote debugging the application from eclipse after having started tomcat outside. The application is working just fine. I am trying to understand the behavior of the above class which I'm unable to do since eclipse is not letting me set a BP.

    P.S : I saw a few threads here talking about BPs not being hit but in my case, I am unable to place the BP!

    P.P.S : I tried JDK 1.6.0_16 before trying out 1.6.0_18.

    Thanks for any pointers.