I have a really strange issue.
I am working on a Java SWING application in Eclipse. I set a breakpoint somewhere in my code, then run the debug. I execute the piece of code containing the breakpoint but it is always skipped.
As soon as I run some code that throws an uncaught exception, the breakpoints start being hit again, without changing anything else. The code that throws the exception and the one containing the breakpoint are not related.
I tried to set the breakpoints in several places but they never get hit until the exception is thrown.
I have this problem only for this one specific application. My debugger works fine for other SWING apps.
Can you think of any reason causing this?
What exact version of eclipse and Java are you running?
Are you aware of this question? (bug 279137: Breakpoints fail to hit under JDK 1.6.0_14 )
As gojomo remarks in the comments, that bug (279137) now (July 21 2009) mentions:
(Option yo add to the eclipse.ini)
FIXED
As the release note of the jdk6_u16 (late August 2009) mentions, that bug has been fixed