Using JMockit 0.999.4 and JDK6, is it possible to debug into a partially mocked class?
Consider the following test:
@Test
public void testClass() {
Answered by Rogerio in the JMockit Google's discussion group.
The JVM discards the breakpoints set on a class after it is redefined (which JMockit does whenever a class is mocked).
To reset the breakpoints, stop the debugger at the test method, just before it enters the code under test. That is, set a breakpoint in the test method, on the line which calls into "SampleClass" in this example.