[coroutines-debugger]: Fix stepping through and leaving scope coroutines

* Fixed extraction of continuation for `ScopeCoroutine` and moved the computation to the Helper class
* When stepping over the closing bracket of the suspend block -> step out


Merge-request: IJ-MR-136650
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>

GitOrigin-RevId: c391c0097530c37d0c2d10fae88df221fffa0fd9
This commit is contained in:
Maria Sokolova
2024-06-14 16:47:27 +00:00
committed by intellij-monorepo-bot
parent 9ad79a14f0
commit 039028fe06
34 changed files with 1141 additions and 844 deletions

View File

@@ -56,6 +56,25 @@ public final class CoroutinesDebugHelper {
return getCoroutineOwner(continuation, false);
}
public static Object getCallerFrame(Object continuation) throws ReflectiveOperationException {
// This method extracts the caller frame of the given continuation.
Class<?> coroutineStackFrame = Class.forName("kotlin.coroutines.jvm.internal.CoroutineStackFrame", false, continuation.getClass().getClassLoader());
Method getCallerFrame = coroutineStackFrame.getDeclaredMethod("getCallerFrame");
getCallerFrame.setAccessible(true);
Object callerFrame = getCallerFrame.invoke(continuation);
// In case the caller frame is the root CoroutineOwner completion added by the debug agent -> return the current continuation
if (callerFrame == null || callerFrame.getClass().getSimpleName().contains(COROUTINE_OWNER_CLASS)) {
return continuation;
}
// In case the caller frame is an instance of ScopeCoroutine, then extract the uCont that is wrapped by the ScopeCoroutine class.
// ScopeCoroutine is used to wrap the current continuation and pass it into withContext/coroutineScope/flow.. invocation
Class<?> scopeCoroutine = Class.forName("kotlinx.coroutines.internal.ScopeCoroutine", false, continuation.getClass().getClassLoader());
if (scopeCoroutine.isInstance(callerFrame)) {
return getCallerFrame.invoke(callerFrame);
}
return callerFrame;
}
private static Object getField(Object object, String fieldName) throws ReflectiveOperationException {
Field field = object.getClass().getField(fieldName);
field.setAccessible(true);

View File

@@ -19,7 +19,16 @@ import java.util.function.Function
object CoroutineBreakpointFacility {
fun installResumeBreakpointInCurrentMethod(suspendContext: SuspendContextImpl): Boolean {
val resumeLocation = suspendContext.location ?: return false
val currentLocation = suspendContext.location ?: return false
val methodLineLocations = currentLocation.method().allLineLocations()
// In case of stepping over the last closing bracket -> step out.
// For a suspend block, the location of the closing bracket is previous to the last
// (the last location is the resume location and corresponds to the first line of the function).
val resumeLocation = if (methodLineLocations.size > 2 && methodLineLocations[methodLineLocations.size - 2] == currentLocation) {
StackFrameInterceptor.instance?.callerLocation(suspendContext)
} else {
currentLocation
} ?: return false
val nextLocationAfterResumeIndex = getLocationOfNextInstructionAfterResume(resumeLocation)
return installCoroutineResumedBreakpoint(suspendContext, resumeLocation, nextLocationAfterResumeIndex)
}

View File

@@ -249,11 +249,9 @@ class CoroutineStackFrameInterceptor : StackFrameInterceptor {
val continuationObject = extractContinuation(frameProxy) ?: return null
val executionContext = DefaultExecutionContext(suspendContext, frameProxy)
val debugMetadata = DebugMetadata.instance(executionContext) ?: return null
// At first, try to extract the completion field of the current BaseContinuationImpl instance,
// if the completion field is null, then return the object itself and try to extract the StackTraceElement
val completionObject = debugMetadata.baseContinuationImpl.getNextContinuation(continuationObject, executionContext) ?: continuationObject
val stackTraceElement = debugMetadata.getStackTraceElement(completionObject, executionContext)?.stackTraceElement() ?: return null
return DebuggerUtilsEx.findOrCreateLocation(suspendContext.debugProcess, stackTraceElement)
val callerFrame = callMethodFromHelper(CoroutinesDebugHelper::class.java, executionContext, "getCallerFrame", listOf(continuationObject))?: return null
val stackTraceElement = debugMetadata.getStackTraceElement(callerFrame as ObjectReference, executionContext)?.stackTraceElement() ?: return null
return stackTraceElement.let { DebuggerUtilsEx.findOrCreateLocation(suspendContext.debugProcess, it) }
}
private fun SuspendContextImpl.getStackFrameProxyImpl(): StackFrameProxyImpl? =

View File

@@ -365,78 +365,70 @@ public abstract class InlineScopesAndK2IdeK2CodeEvaluateExpressionTestGenerated
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/evaluation/singleBreakpoint/coroutines/stepOut")
public abstract static class StepOut extends AbstractInlineScopesAndK2IdeK2CodeEvaluateExpressionTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/evaluation/singleBreakpoint/coroutines/stepOut")
public static class Uncategorized extends AbstractInlineScopesAndK2IdeK2CodeEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K2;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
public static class StepOut extends AbstractInlineScopesAndK2IdeK2CodeEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K2;
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported")
public static class Unsupported extends AbstractInlineScopesAndK2IdeK2CodeEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K2;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithContext.kt")
public void testStepOutWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithContext.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
@TestMetadata("stepOverAndOutOfWithContext.kt")
public void testStepOverAndOutOfWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOverAndOutOfWithContext.kt");
}
}
@@ -481,6 +473,16 @@ public abstract class InlineScopesAndK2IdeK2CodeEvaluateExpressionTestGenerated
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/oneCoroutine1.kt");
}
@TestMetadata("smartStepIntoAndStepOverCoroutineScope.kt")
public void testSmartStepIntoAndStepOverCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverCoroutineScope.kt");
}
@TestMetadata("smartStepIntoAndStepOverWithContext.kt")
public void testSmartStepIntoAndStepOverWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverWithContext.kt");
}
@TestMetadata("soSuspendableCallInEndOfFun.kt")
public void testSoSuspendableCallInEndOfFun() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/soSuspendableCallInEndOfFun.kt");
@@ -501,6 +503,11 @@ public abstract class InlineScopesAndK2IdeK2CodeEvaluateExpressionTestGenerated
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCancelledAwait.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverCoroutineScopeClosingBracket.kt")
public void testStepOverCoroutineScopeClosingBracket() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScopeClosingBracket.kt");
@@ -516,6 +523,11 @@ public abstract class InlineScopesAndK2IdeK2CodeEvaluateExpressionTestGenerated
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverThroughAllMethods.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverWithContext.kt");
}
@TestMetadata("stepThroughCoroutineScope.kt")
public void testStepThroughCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepThroughCoroutineScope.kt");
@@ -540,16 +552,6 @@ public abstract class InlineScopesAndK2IdeK2CodeEvaluateExpressionTestGenerated
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/newSingleThreadContext.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverWithContext.kt");
}
@TestMetadata("stopInCoroutineScope.kt")
public void testStopInCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stopInCoroutineScope.kt");

View File

@@ -365,78 +365,70 @@ public abstract class K2IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/evaluation/singleBreakpoint/coroutines/stepOut")
public abstract static class StepOut extends AbstractK2IdeK2CodeKotlinEvaluateExpressionTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/evaluation/singleBreakpoint/coroutines/stepOut")
public static class Uncategorized extends AbstractK2IdeK2CodeKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K2;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
public static class StepOut extends AbstractK2IdeK2CodeKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K2;
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported")
public static class Unsupported extends AbstractK2IdeK2CodeKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K2;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithContext.kt")
public void testStepOutWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithContext.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
@TestMetadata("stepOverAndOutOfWithContext.kt")
public void testStepOverAndOutOfWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOverAndOutOfWithContext.kt");
}
}
@@ -481,6 +473,16 @@ public abstract class K2IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/oneCoroutine1.kt");
}
@TestMetadata("smartStepIntoAndStepOverCoroutineScope.kt")
public void testSmartStepIntoAndStepOverCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverCoroutineScope.kt");
}
@TestMetadata("smartStepIntoAndStepOverWithContext.kt")
public void testSmartStepIntoAndStepOverWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverWithContext.kt");
}
@TestMetadata("soSuspendableCallInEndOfFun.kt")
public void testSoSuspendableCallInEndOfFun() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/soSuspendableCallInEndOfFun.kt");
@@ -501,6 +503,11 @@ public abstract class K2IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCancelledAwait.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverCoroutineScopeClosingBracket.kt")
public void testStepOverCoroutineScopeClosingBracket() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScopeClosingBracket.kt");
@@ -516,6 +523,11 @@ public abstract class K2IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverThroughAllMethods.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverWithContext.kt");
}
@TestMetadata("stepThroughCoroutineScope.kt")
public void testStepThroughCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/stepThroughCoroutineScope.kt");
@@ -540,16 +552,6 @@ public abstract class K2IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/newSingleThreadContext.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverWithContext.kt");
}
@TestMetadata("stopInCoroutineScope.kt")
public void testStopInCoroutineScope() throws Exception {
runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stopInCoroutineScope.kt");

View File

@@ -365,78 +365,70 @@ public abstract class IndyLambdaIrKotlinEvaluateExpressionTestGenerated extends
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public abstract static class StepOut extends AbstractIndyLambdaIrKotlinEvaluateExpressionTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public static class Uncategorized extends AbstractIndyLambdaIrKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
public static class StepOut extends AbstractIndyLambdaIrKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported")
public static class Unsupported extends AbstractIndyLambdaIrKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithContext.kt")
public void testStepOutWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithContext.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
@TestMetadata("stepOverAndOutOfWithContext.kt")
public void testStepOverAndOutOfWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOverAndOutOfWithContext.kt");
}
}
@@ -481,6 +473,16 @@ public abstract class IndyLambdaIrKotlinEvaluateExpressionTestGenerated extends
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/oneCoroutine1.kt");
}
@TestMetadata("smartStepIntoAndStepOverCoroutineScope.kt")
public void testSmartStepIntoAndStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverCoroutineScope.kt");
}
@TestMetadata("smartStepIntoAndStepOverWithContext.kt")
public void testSmartStepIntoAndStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverWithContext.kt");
}
@TestMetadata("soSuspendableCallInEndOfFun.kt")
public void testSoSuspendableCallInEndOfFun() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/soSuspendableCallInEndOfFun.kt");
@@ -501,6 +503,11 @@ public abstract class IndyLambdaIrKotlinEvaluateExpressionTestGenerated extends
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCancelledAwait.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverCoroutineScopeClosingBracket.kt")
public void testStepOverCoroutineScopeClosingBracket() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScopeClosingBracket.kt");
@@ -516,6 +523,11 @@ public abstract class IndyLambdaIrKotlinEvaluateExpressionTestGenerated extends
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverThroughAllMethods.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverWithContext.kt");
}
@TestMetadata("stepThroughCoroutineScope.kt")
public void testStepThroughCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepThroughCoroutineScope.kt");
@@ -540,16 +552,6 @@ public abstract class IndyLambdaIrKotlinEvaluateExpressionTestGenerated extends
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/newSingleThreadContext.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverWithContext.kt");
}
@TestMetadata("stopInCoroutineScope.kt")
public void testStopInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stopInCoroutineScope.kt");

View File

@@ -365,78 +365,70 @@ public abstract class InlineScopesAndK1IdeK2CodeEvaluateExpressionTestGenerated
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public abstract static class StepOut extends AbstractInlineScopesAndK1IdeK2CodeEvaluateExpressionTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public static class Uncategorized extends AbstractInlineScopesAndK1IdeK2CodeEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
public static class StepOut extends AbstractInlineScopesAndK1IdeK2CodeEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported")
public static class Unsupported extends AbstractInlineScopesAndK1IdeK2CodeEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithContext.kt")
public void testStepOutWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithContext.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
@TestMetadata("stepOverAndOutOfWithContext.kt")
public void testStepOverAndOutOfWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOverAndOutOfWithContext.kt");
}
}
@@ -481,6 +473,16 @@ public abstract class InlineScopesAndK1IdeK2CodeEvaluateExpressionTestGenerated
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/oneCoroutine1.kt");
}
@TestMetadata("smartStepIntoAndStepOverCoroutineScope.kt")
public void testSmartStepIntoAndStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverCoroutineScope.kt");
}
@TestMetadata("smartStepIntoAndStepOverWithContext.kt")
public void testSmartStepIntoAndStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverWithContext.kt");
}
@TestMetadata("soSuspendableCallInEndOfFun.kt")
public void testSoSuspendableCallInEndOfFun() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/soSuspendableCallInEndOfFun.kt");
@@ -501,6 +503,11 @@ public abstract class InlineScopesAndK1IdeK2CodeEvaluateExpressionTestGenerated
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCancelledAwait.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverCoroutineScopeClosingBracket.kt")
public void testStepOverCoroutineScopeClosingBracket() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScopeClosingBracket.kt");
@@ -516,6 +523,11 @@ public abstract class InlineScopesAndK1IdeK2CodeEvaluateExpressionTestGenerated
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverThroughAllMethods.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverWithContext.kt");
}
@TestMetadata("stepThroughCoroutineScope.kt")
public void testStepThroughCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepThroughCoroutineScope.kt");
@@ -540,16 +552,6 @@ public abstract class InlineScopesAndK1IdeK2CodeEvaluateExpressionTestGenerated
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/newSingleThreadContext.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverWithContext.kt");
}
@TestMetadata("stopInCoroutineScope.kt")
public void testStopInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stopInCoroutineScope.kt");

View File

@@ -365,78 +365,70 @@ public abstract class IrKotlinEvaluateExpressionInMppTestGenerated extends Abstr
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public abstract static class StepOut extends AbstractIrKotlinEvaluateExpressionInMppTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public static class Uncategorized extends AbstractIrKotlinEvaluateExpressionInMppTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
public static class StepOut extends AbstractIrKotlinEvaluateExpressionInMppTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported")
public static class Unsupported extends AbstractIrKotlinEvaluateExpressionInMppTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithContext.kt")
public void testStepOutWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithContext.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
@TestMetadata("stepOverAndOutOfWithContext.kt")
public void testStepOverAndOutOfWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOverAndOutOfWithContext.kt");
}
}
@@ -481,6 +473,16 @@ public abstract class IrKotlinEvaluateExpressionInMppTestGenerated extends Abstr
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/oneCoroutine1.kt");
}
@TestMetadata("smartStepIntoAndStepOverCoroutineScope.kt")
public void testSmartStepIntoAndStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverCoroutineScope.kt");
}
@TestMetadata("smartStepIntoAndStepOverWithContext.kt")
public void testSmartStepIntoAndStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverWithContext.kt");
}
@TestMetadata("soSuspendableCallInEndOfFun.kt")
public void testSoSuspendableCallInEndOfFun() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/soSuspendableCallInEndOfFun.kt");
@@ -501,6 +503,11 @@ public abstract class IrKotlinEvaluateExpressionInMppTestGenerated extends Abstr
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCancelledAwait.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverCoroutineScopeClosingBracket.kt")
public void testStepOverCoroutineScopeClosingBracket() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScopeClosingBracket.kt");
@@ -516,6 +523,11 @@ public abstract class IrKotlinEvaluateExpressionInMppTestGenerated extends Abstr
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverThroughAllMethods.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverWithContext.kt");
}
@TestMetadata("stepThroughCoroutineScope.kt")
public void testStepThroughCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepThroughCoroutineScope.kt");
@@ -540,16 +552,6 @@ public abstract class IrKotlinEvaluateExpressionInMppTestGenerated extends Abstr
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/newSingleThreadContext.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverWithContext.kt");
}
@TestMetadata("stopInCoroutineScope.kt")
public void testStopInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stopInCoroutineScope.kt");

View File

@@ -365,78 +365,70 @@ public abstract class IrKotlinEvaluateExpressionTestGenerated extends AbstractIr
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public abstract static class StepOut extends AbstractIrKotlinEvaluateExpressionTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public static class Uncategorized extends AbstractIrKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_OLD_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
public static class StepOut extends AbstractIrKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported")
public static class Unsupported extends AbstractIrKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_OLD_EVALUATOR, testDataFilePath);
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_OLD_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithContext.kt")
public void testStepOutWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithContext.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
@TestMetadata("stepOverAndOutOfWithContext.kt")
public void testStepOverAndOutOfWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOverAndOutOfWithContext.kt");
}
}
@@ -481,6 +473,16 @@ public abstract class IrKotlinEvaluateExpressionTestGenerated extends AbstractIr
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/oneCoroutine1.kt");
}
@TestMetadata("smartStepIntoAndStepOverCoroutineScope.kt")
public void testSmartStepIntoAndStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverCoroutineScope.kt");
}
@TestMetadata("smartStepIntoAndStepOverWithContext.kt")
public void testSmartStepIntoAndStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverWithContext.kt");
}
@TestMetadata("soSuspendableCallInEndOfFun.kt")
public void testSoSuspendableCallInEndOfFun() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/soSuspendableCallInEndOfFun.kt");
@@ -501,6 +503,11 @@ public abstract class IrKotlinEvaluateExpressionTestGenerated extends AbstractIr
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCancelledAwait.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverCoroutineScopeClosingBracket.kt")
public void testStepOverCoroutineScopeClosingBracket() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScopeClosingBracket.kt");
@@ -516,6 +523,11 @@ public abstract class IrKotlinEvaluateExpressionTestGenerated extends AbstractIr
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverThroughAllMethods.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverWithContext.kt");
}
@TestMetadata("stepThroughCoroutineScope.kt")
public void testStepThroughCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepThroughCoroutineScope.kt");
@@ -540,16 +552,6 @@ public abstract class IrKotlinEvaluateExpressionTestGenerated extends AbstractIr
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/newSingleThreadContext.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverWithContext.kt");
}
@TestMetadata("stopInCoroutineScope.kt")
public void testStopInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stopInCoroutineScope.kt");

View File

@@ -365,78 +365,70 @@ public abstract class IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenera
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public abstract static class StepOut extends AbstractIrKotlinEvaluateExpressionWithIRFragmentCompilerTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public static class Uncategorized extends AbstractIrKotlinEvaluateExpressionWithIRFragmentCompilerTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
public static class StepOut extends AbstractIrKotlinEvaluateExpressionWithIRFragmentCompilerTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported")
public static class Unsupported extends AbstractIrKotlinEvaluateExpressionWithIRFragmentCompilerTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithContext.kt")
public void testStepOutWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithContext.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
@TestMetadata("stepOverAndOutOfWithContext.kt")
public void testStepOverAndOutOfWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOverAndOutOfWithContext.kt");
}
}
@@ -481,6 +473,16 @@ public abstract class IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenera
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/oneCoroutine1.kt");
}
@TestMetadata("smartStepIntoAndStepOverCoroutineScope.kt")
public void testSmartStepIntoAndStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverCoroutineScope.kt");
}
@TestMetadata("smartStepIntoAndStepOverWithContext.kt")
public void testSmartStepIntoAndStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverWithContext.kt");
}
@TestMetadata("soSuspendableCallInEndOfFun.kt")
public void testSoSuspendableCallInEndOfFun() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/soSuspendableCallInEndOfFun.kt");
@@ -501,6 +503,11 @@ public abstract class IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenera
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCancelledAwait.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverCoroutineScopeClosingBracket.kt")
public void testStepOverCoroutineScopeClosingBracket() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScopeClosingBracket.kt");
@@ -516,6 +523,11 @@ public abstract class IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenera
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverThroughAllMethods.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverWithContext.kt");
}
@TestMetadata("stepThroughCoroutineScope.kt")
public void testStepThroughCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepThroughCoroutineScope.kt");
@@ -540,16 +552,6 @@ public abstract class IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenera
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/newSingleThreadContext.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverWithContext.kt");
}
@TestMetadata("stopInCoroutineScope.kt")
public void testStopInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stopInCoroutineScope.kt");

View File

@@ -365,78 +365,70 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated exte
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public abstract static class StepOut extends AbstractK1IdeK2CodeKotlinEvaluateExpressionInMppTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public static class Uncategorized extends AbstractK1IdeK2CodeKotlinEvaluateExpressionInMppTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
public static class StepOut extends AbstractK1IdeK2CodeKotlinEvaluateExpressionInMppTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported")
public static class Unsupported extends AbstractK1IdeK2CodeKotlinEvaluateExpressionInMppTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithContext.kt")
public void testStepOutWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithContext.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
@TestMetadata("stepOverAndOutOfWithContext.kt")
public void testStepOverAndOutOfWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOverAndOutOfWithContext.kt");
}
}
@@ -481,6 +473,16 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated exte
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/oneCoroutine1.kt");
}
@TestMetadata("smartStepIntoAndStepOverCoroutineScope.kt")
public void testSmartStepIntoAndStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverCoroutineScope.kt");
}
@TestMetadata("smartStepIntoAndStepOverWithContext.kt")
public void testSmartStepIntoAndStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverWithContext.kt");
}
@TestMetadata("soSuspendableCallInEndOfFun.kt")
public void testSoSuspendableCallInEndOfFun() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/soSuspendableCallInEndOfFun.kt");
@@ -501,6 +503,11 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated exte
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCancelledAwait.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverCoroutineScopeClosingBracket.kt")
public void testStepOverCoroutineScopeClosingBracket() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScopeClosingBracket.kt");
@@ -516,6 +523,11 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated exte
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverThroughAllMethods.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverWithContext.kt");
}
@TestMetadata("stepThroughCoroutineScope.kt")
public void testStepThroughCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepThroughCoroutineScope.kt");
@@ -540,16 +552,6 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated exte
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/newSingleThreadContext.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverWithContext.kt");
}
@TestMetadata("stopInCoroutineScope.kt")
public void testStopInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stopInCoroutineScope.kt");

View File

@@ -365,78 +365,70 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public abstract static class StepOut extends AbstractK1IdeK2CodeKotlinEvaluateExpressionTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut")
public static class Uncategorized extends AbstractK1IdeK2CodeKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
public static class StepOut extends AbstractK1IdeK2CodeKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported")
public static class Unsupported extends AbstractK1IdeK2CodeKotlinEvaluateExpressionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath);
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutCoroutineScope.kt")
public void testStepOutCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutCoroutineScope.kt");
}
@TestMetadata("stepOutNoSuspension.kt")
public void testStepOutNoSuspension() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutNoSuspension.kt");
}
@TestMetadata("stepOutOfSingleSuspendCall.kt")
public void testStepOutOfSingleSuspendCall() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt");
}
@TestMetadata("stepOutSeveralSuspendFrames.kt")
public void testStepOutSeveralSuspendFrames() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt");
}
@TestMetadata("stepOutTailCallOptimization.kt")
public void testStepOutTailCallOptimization() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutTailCallOptimization.kt");
}
@TestMetadata("stepOutWithContext.kt")
public void testStepOutWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithContext.kt");
}
@TestMetadata("stepOutWithCounter.kt")
public void testStepOutWithCounter() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounter.kt");
}
@TestMetadata("stepOutWithCounterInCoroutineScope.kt")
public void testStepOutWithCounterInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInCoroutineScope.kt");
}
@TestMetadata("stepOutWithCounterInLaunch.kt")
public void testStepOutWithCounterInLaunch() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithCounterInLaunch.kt");
}
@TestMetadata("stepOutWithException.kt")
public void testStepOutWithException() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt");
}
@TestMetadata("stepOverAndOutOfWithContext.kt")
public void testStepOverAndOutOfWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOverAndOutOfWithContext.kt");
}
}
@@ -481,6 +473,16 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/oneCoroutine1.kt");
}
@TestMetadata("smartStepIntoAndStepOverCoroutineScope.kt")
public void testSmartStepIntoAndStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverCoroutineScope.kt");
}
@TestMetadata("smartStepIntoAndStepOverWithContext.kt")
public void testSmartStepIntoAndStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/smartStepIntoAndStepOverWithContext.kt");
}
@TestMetadata("soSuspendableCallInEndOfFun.kt")
public void testSoSuspendableCallInEndOfFun() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/soSuspendableCallInEndOfFun.kt");
@@ -501,6 +503,11 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCancelledAwait.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverCoroutineScopeClosingBracket.kt")
public void testStepOverCoroutineScopeClosingBracket() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverCoroutineScopeClosingBracket.kt");
@@ -516,6 +523,11 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverThroughAllMethods.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepOverWithContext.kt");
}
@TestMetadata("stepThroughCoroutineScope.kt")
public void testStepThroughCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/stepThroughCoroutineScope.kt");
@@ -540,16 +552,6 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/newSingleThreadContext.kt");
}
@TestMetadata("stepOverCoroutineScope.kt")
public void testStepOverCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverCoroutineScope.kt");
}
@TestMetadata("stepOverWithContext.kt")
public void testStepOverWithContext() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stepOverWithContext.kt");
}
@TestMetadata("stopInCoroutineScope.kt")
public void testStopInCoroutineScope() throws Exception {
runTest("testData/evaluation/singleBreakpoint/coroutines/stepOver/unsupported/stopInCoroutineScope.kt");

View File

@@ -0,0 +1,39 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
package stepOutCoroutineScope
import kotlinx.coroutines.*
suspend fun foo(i: Int) {
println("Start foo")
coroutineScope {
if (i == 25) {
//Breakpoint!
delay(1)
println("After delay")
}
}
println("coroutineScope completed")
delay(1)
println(i)
}
fun main() {
runBlocking {
for (i in 1 .. 100) {
launch(Dispatchers.Default) {
foo(i)
}
}
}
}
// STEP_OUT: 1
// STEP_OVER: 2
// EXPRESSION: i
// RESULT: 25: I
// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true
// REGISTRY: debugger.always.suspend.thread.before.switch=true
// REGISTRY: debugger.async.stacks.coroutines=false

View File

@@ -0,0 +1,11 @@
LineBreakpoint created at stepOutCoroutineScope.kt:12
Run Java
Connected to the target VM
stepOutCoroutineScope.kt:12
stepOutCoroutineScope.kt:16
stepOutCoroutineScope.kt:17
stepOutCoroutineScope.kt:18
Compile bytecode for i
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -37,4 +37,8 @@ fun main() {
}
}
// STEP_OUT: 5
// STEP_OUT: 5
// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true
// REGISTRY: debugger.always.suspend.thread.before.switch=true
// REGISTRY: debugger.async.stacks.coroutines=false

View File

@@ -0,0 +1,47 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
package stepOutCoroutineScope
import kotlinx.coroutines.*
suspend fun foo(i: Int) {
println("Start foo")
var counter = 0
withContext(Dispatchers.Default) {
if (i == 25) {
//Breakpoint!
delay(1)
counter++
println("After delay")
}
counter++
delay(10)
counter++
}
delay(1)
i.toString()
counter.toString()
}
fun main() {
runBlocking {
for (i in 1 .. 100) {
launch(Dispatchers.Default) {
foo(i)
}
}
}
}
// STEP_OUT: 1
// STEP_OVER: 2
// EXPRESSION: i
// RESULT: 25: I
// EXPRESSION: counter
// RESULT: 3: I
// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true
// REGISTRY: debugger.always.suspend.thread.before.switch=true
// REGISTRY: debugger.async.stacks.coroutines=false

View File

@@ -0,0 +1,12 @@
LineBreakpoint created at stepOutWithContext.kt:13
Run Java
Connected to the target VM
stepOutWithContext.kt:13
stepOutWithContext.kt:21
stepOutWithContext.kt:22
stepOutWithContext.kt:23
Compile bytecode for i
Compile bytecode for counter
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -0,0 +1,39 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
import kotlinx.coroutines.*
fun main() = runBlocking {
for (i in 0 .. 100) {
launch(Dispatchers.Default) {
foo(i)
}
}
println()
}
suspend fun foo(i: Int) {
println()
withContext(Dispatchers.IO) {
if (i == 25) {
//Breakpoint!
i.toString()
}
bar(5, 7);
delay(10);
i.toString()
} // the last step over is a step out
delay(10)
i.toString()
}
suspend fun bar(x: Int, y: Int) {
delay(10)
x.toString()
y.toString()
delay(10)
}
// STEP_OVER: 5
// EXPRESSION: i
// RESULT: 25: I

View File

@@ -0,0 +1,13 @@
LineBreakpoint created at stepOverAndOutOfWithContext.kt:19
Run Java
Connected to the target VM
stepOverAndOutOfWithContext.kt:19
stepOverAndOutOfWithContext.kt:21
stepOverAndOutOfWithContext.kt:22
stepOverAndOutOfWithContext.kt:23
stepOverAndOutOfWithContext.kt:25
stepOverAndOutOfWithContext.kt:26
Compile bytecode for i
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -1,27 +0,0 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
package stepOutCoroutineScope
import kotlinx.coroutines.*
// TODO: what behaviour is expected? Should we get to line 14?
suspend fun foo(i: Int) {
println("Start foo")
coroutineScope { // TODO: hangs if we try to step over from this breakpoint (only in tests)
//Breakpoint!
delay(1)
println("After delay")
}
println("coroutineScope completed")
}
fun main() {
runBlocking {
for (i in 1 .. 3) {
launch {
foo(i)
}
}
}
}
// STEP_OUT: 1

View File

@@ -1,10 +0,0 @@
LineBreakpoint created at stepOutCoroutineScope.kt:11
Run Java
Connected to the target VM
stepOutCoroutineScope.kt:11
stepOutCoroutineScope.kt:9
stepOutCoroutineScope.kt:11
resuming stepOutCoroutineScope.kt:11
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -0,0 +1,39 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
import kotlinx.coroutines.*
fun main() = runBlocking {
for (i in 0 .. 100) {
launch(Dispatchers.Default) {
//Breakpoint!
i.toString()
coroutineScope {
delay(10)
bar(i, 5)
i.toString()
}
i.toString()
coroutineScope {
delay(10)
bar(i, 10)
i.toString()
}
i.toString()
}
}
}
suspend fun bar(x: Int, y: Int) {
delay(10)
x.toString()
y.toString()
delay(10)
}
// STEP_OVER: 1
// SMART_STEP_INTO_BY_INDEX: 1
// STEP_OVER: 6
// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true
// REGISTRY: debugger.always.suspend.thread.before.switch=true
// REGISTRY: debugger.async.stacks.coroutines=false

View File

@@ -0,0 +1,15 @@
LineBreakpoint created at smartStepIntoAndStepOverCoroutineScope.kt:9
Run Java
Connected to the target VM
smartStepIntoAndStepOverCoroutineScope.kt:9
smartStepIntoAndStepOverCoroutineScope.kt:10
smartStepIntoAndStepOverCoroutineScope.kt:11
smartStepIntoAndStepOverCoroutineScope.kt:12
smartStepIntoAndStepOverCoroutineScope.kt:13
smartStepIntoAndStepOverCoroutineScope.kt:15
smartStepIntoAndStepOverCoroutineScope.kt:16
smartStepIntoAndStepOverCoroutineScope.kt:21
smartStepIntoAndStepOverCoroutineScope.kt:22
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -0,0 +1,39 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
import kotlinx.coroutines.*
fun main() = runBlocking {
for (i in 0 .. 100) {
launch(Dispatchers.Default) {
//Breakpoint!
i.toString()
withContext(Dispatchers.Default) {
delay(10)
bar(i, 5)
i.toString()
}
i.toString()
withContext(Dispatchers.Default) {
delay(10)
bar(i, 10)
i.toString()
}
i.toString()
}
}
}
suspend fun bar(x: Int, y: Int) {
delay(10)
x.toString()
y.toString()
delay(10)
}
// STEP_OVER: 1
// SMART_STEP_INTO_BY_INDEX: 1
// STEP_OVER: 6
// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true
// REGISTRY: debugger.always.suspend.thread.before.switch=true
// REGISTRY: debugger.async.stacks.coroutines=false

View File

@@ -0,0 +1,15 @@
LineBreakpoint created at smartStepIntoAndStepOverWithContext.kt:9
Run Java
Connected to the target VM
smartStepIntoAndStepOverWithContext.kt:9
smartStepIntoAndStepOverWithContext.kt:10
smartStepIntoAndStepOverWithContext.kt:11
smartStepIntoAndStepOverWithContext.kt:12
smartStepIntoAndStepOverWithContext.kt:13
smartStepIntoAndStepOverWithContext.kt:15
smartStepIntoAndStepOverWithContext.kt:16
smartStepIntoAndStepOverWithContext.kt:21
smartStepIntoAndStepOverWithContext.kt:22
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -0,0 +1,37 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
import kotlinx.coroutines.*
fun main() = runBlocking {
for (i in 0 .. 100) {
launch(Dispatchers.Default) {
//Breakpoint!
i.toString()
coroutineScope {
delay(10)
bar(i, 5)
i.toString()
}
i.toString()
coroutineScope {
delay(10)
bar(i, 10)
i.toString()
}
i.toString()
}
}
}
suspend fun bar(x: Int, y: Int) {
delay(10)
x.toString()
y.toString()
delay(10)
}
// STEP_OVER: 4
// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true
// REGISTRY: debugger.always.suspend.thread.before.switch=true
// REGISTRY: debugger.async.stacks.coroutines=false

View File

@@ -0,0 +1,11 @@
LineBreakpoint created at stepOverCoroutineScope.kt:9
Run Java
Connected to the target VM
stepOverCoroutineScope.kt:9
stepOverCoroutineScope.kt:10
stepOverCoroutineScope.kt:15
stepOverCoroutineScope.kt:16
stepOverCoroutineScope.kt:21
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -10,10 +10,10 @@ stepOverThroughAllMethods.kt:39
stepOverThroughAllMethods.kt:40
stepOverThroughAllMethods.kt:23
stepOverThroughAllMethods.kt:24
stepOverThroughAllMethods.kt:8
stepOverThroughAllMethods.kt:10
stepOverThroughAllMethods.kt:8
stepOverThroughAllMethods.kt:11
stepOverThroughAllMethods.kt:12
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -0,0 +1,54 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
import kotlinx.coroutines.*
import kotlin.system.measureTimeMillis
suspend fun compute(action: suspend () -> Unit) {
val n = 2
val k = 10
val time = measureTimeMillis {
coroutineScope {
repeat(n) {
launch {
repeat(k) { action() }
}
}
}
}
println("Completed")
}
var counter = 0
fun main() = runBlocking {
for (i in 0 ..100) {
launch(Dispatchers.Default) {
if (i == 25) {
//Breakpoint!
i.toString()
delay(10)
}
withContext(Dispatchers.Default) {
compute {
counter++
}
}
i.toString()
withContext(Dispatchers.Unconfined) {
compute {
counter++
}
}
}
}
println("Counter = $counter")
}
// STEP_OVER: 6
// EXPRESSION: i
// RESULT: 25: I
// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true
// REGISTRY: debugger.always.suspend.thread.before.switch=true
// REGISTRY: debugger.async.stacks.coroutines=false

View File

@@ -0,0 +1,12 @@
LineBreakpoint created at stepOverWithContext.kt:28
Run Java
Connected to the target VM
stepOverWithContext.kt:28
stepOverWithContext.kt:29
stepOverWithContext.kt:31
stepOverWithContext.kt:36
stepOverWithContext.kt:37
stepOverWithContext.kt:42
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -1,36 +0,0 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
import kotlinx.coroutines.*
import kotlin.system.measureTimeMillis
suspend fun compute(action: suspend () -> Unit) {
val n = 2
val k = 10
val time = measureTimeMillis {
coroutineScope {
repeat(n) {
launch {
repeat(k) { action() }
}
}
}
}
println("Completed")
}
var counter = 0
fun main() = runBlocking {
//println(1)
//Breakpoint!
coroutineScope {
delay(1)
}
coroutineScope {
delay(1)
}
println("Counter = $counter")
}
// STEP_OVER: 6
// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true

View File

@@ -1,12 +0,0 @@
LineBreakpoint created at stepOverCoroutineScope.kt:26
Run Java
Connected to the target VM
stepOverCoroutineScope.kt:26
stepOverCoroutineScope.kt:26
stepOverCoroutineScope.kt:27
stepOverCoroutineScope.kt:28
stepOverCoroutineScope.kt:23
stepOverCoroutineScope.kt:33
Disconnected from the target VM
Process finished with exit code 0

View File

@@ -1,39 +0,0 @@
// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent
import kotlinx.coroutines.*
import kotlin.system.measureTimeMillis
suspend fun compute(action: suspend () -> Unit) {
val n = 2
val k = 10
val time = measureTimeMillis {
coroutineScope {
repeat(n) {
launch {
repeat(k) { action() }
}
}
}
}
println("Completed")
}
var counter = 0
fun main() = runBlocking {
//Breakpoint!
withContext(Dispatchers.Default) {
compute {
counter++
}
}
withContext(Dispatchers.Unconfined) {
compute {
counter++
}
}
println("Counter = $counter")
}
// STEP_OVER: 6
// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true

View File

@@ -1,10 +0,0 @@
LineBreakpoint created at stepOverWithContext.kt:25
Run Java
Connected to the target VM
stepOverWithContext.kt:25
stepOverWithContext.kt:25
stepOverWithContext.kt:26
stepOverWithContext.kt:29
Disconnected from the target VM
Process finished with exit code 0