class PopAndStepTarg { publicvoid B() {
System.out.println("debuggee: in B"); // B_LINE_1
System.out.println("debuggee: in B, back to A"); // B_LINE_2
}
publicvoid A() {
System.out.println("debuggee: in A, about to call B"); // A_LINE_1
B(); // A_LINE_2
System.out.println("debuggee: in A, back from B"); // A_LINE_3 thrownew RuntimeException("debuggee: Got to line A_LINE_4:" + PopAndStepTest.A_LINE_4); // A_LINE_4
}
println("Resuming to line B_LINE_2 : " + B_LINE_2);
bpe = resumeTo("PopAndStepTarg", B_LINE_2); getDebuggeeLineNum(B_LINE_2);
// The failure is this: // create step request // enable step request // pop frame // do the step // do another step - This step runs to completion
EventRequestManager erm = eventRequestManager();
StepRequest srInto = erm.createStepRequest(mainThread, StepRequest.STEP_LINE,
StepRequest.STEP_INTO);
srInto.addClassExclusionFilter("java.*");
srInto.addClassExclusionFilter("javax.*");
srInto.addClassExclusionFilter("sun.*");
srInto.addClassExclusionFilter("com.sun.*");
srInto.addClassExclusionFilter("com.oracle.*");
srInto.addClassExclusionFilter("oracle.*");
srInto.addClassExclusionFilter("jdk.internal.*");
srInto.addCountFilter(1);
srInto.enable(); // This fails
mainThread.popFrames(frameFor("A")); //srInto.enable(); // if the enable is moved here, it passes
println("Popped back to line MAIN_LINE_3(" + MAIN_LINE_3 + ") in main, the call to A()");
println("Stepping into line A_LINE_1:" + A_LINE_1);
waitForRequestedEvent(srInto); // println
srInto.disable();
getDebuggeeLineNum(A_LINE_1);
// The failure occurs here.
println("Stepping over to line A_LINE_2:" + A_LINE_2);
stepOverLine(mainThread); // println
getDebuggeeLineNum(A_LINE_2);
println("Stepping over to line A_LINE_3:" + A_LINE_3);
stepOverLine(mainThread); // call to B()
getDebuggeeLineNum(A_LINE_3);
vm().exit(0);
if (testFailed) { thrownew Exception("PopAndStepTest failed");
}
println("Passed:");
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.