3

I've been using Eclipse for ages and I use the debugger all the time but recently I've known it to skip over breakpoints while debugging! I've even had it so that I've set a break point on a println I'll see the text come out but not hit the breakpoint. Also sometimes I'll hit a break point consistently in one area of the code but not in others. This never used to happen and I can't work out what I've done to my system to cause this. Has anyone else had any experience of the problem?

Benj
  • 31,668
  • 17
  • 78
  • 127
  • 1
    I confirm: the issue lies solely in the JRE you are using to run your program within eclipse. Not in the JVM used to launch eclipse, nor in the Java component (Swing or otherwise) you may be using. – VonC Nov 05 '09 at 11:27

3 Answers3

3

What you mention ("-XX:+UseParallelGC") is a workaround for the bug found with jdk6u14 and 15.

As mentionned in "Eclipse SWING app: breakpoint hit only after an uncaught exception is thrown", it is fixed with jdk6u16.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Ahah, thanks for that. I'm actually using JRE 6.0_15 but I guess it's the JRE which is the issue really. Also I'm not using swing but SWT however I guess the problem is actually core java related rather than related to a specific windowing toolkit. – Benj Nov 05 '09 at 11:21
2

Ahaha,

I've found the solution eventually after a long web trawl. I'm not sure why this happens but other people have seen the problem too and

Window -> Preferences -> Java -> Installed JRE's -> (edit your currently used JRE) -> Edit "Default VM Arguments" box and enter (w/o questionmarks) "-XX:+UseParallelGC"

Generally fixes the problem...

Benj
  • 31,668
  • 17
  • 78
  • 127
2

I encountered the same issue. My solution is, you do a clean on the project (Project->Clean) and build again(Project->Build All or Project->Build Project). Upon a successful build, Debug the project again. It will go through the code perfectly (in the proper way).

Sid
  • 21
  • 5