[ACCEPTED]-JUnit won't stop at breakpoints in Eclipse (using JDK 1.6.0.20)-breakpoints

Accepted answer
Score: 44

You should start your unit-tests with Debug as > JUnit test

0

Score: 14

If your break points appear with a back 5 slash across, you have to go to the debug 4 perspective (Window → Open perspective) and 3 in the ‘Breakpoints’ window, unselect the 2 ‘Skip all break points’ button (circle with 1 backslash across)

Score: 1

Plese use

-XX:+UseParallelGC

in debug configuration > VM arguments 1 section

Score: 0

I've had this problem today and for me the 8 reason was pure stupidity – if the unit 7 test outputs something to the console at 6 first and throws an exception afterwards, both 5 before reaching the breakpoint, you do not 4 see the exception in eclipse's debug perspective 3 because it gets printed in the JUnit view, but 2 the output before switched away from that 1 view to the Console output.

Score: 0

There's likely an error in your test which 6 is preventing JUnit from getting to the 5 thing you're trying to test. JUnit doesn't 4 like to show these errors. Try removing 3 lines from your unit tests until they start 2 to work, or put breakpoints inside the methods 1 your unit test is calling.

More Related questions