From 2cc8fa2e6929d3b63a2d4050e3bb5b34badc2e86 Mon Sep 17 00:00:00 2001 From: Maria Sokolova Date: Thu, 14 Mar 2024 18:15:55 +0000 Subject: [PATCH] [coroutine-debugger]: Step out before a suspend call should execute the function before jumping to the parent frame. IDEA-349060 Merge-request: IJ-MR-128837 Merged-by: Maria Sokolova GitOrigin-RevId: 5cbb101132a960f52f51050f6a4cf13264ee0d07 --- .../core/stepping/KotlinStepActionFactory.kt | 21 +- .../CoroutineStackFrameInterceptor.kt | 9 +- ...2IdeK1CodeKotlinSteppingTestGenerated.java | 5 - ...KotlinEvaluateExpressionTestGenerated.java | 213 +++++++++++------- ...2IdeK2CodeKotlinSteppingTestGenerated.java | 5 - ...IndyLambdaKotlinSteppingTestGenerated.java | 5 - ...KotlinEvaluateExpressionTestGenerated.java | 213 +++++++++++------- ...dyLambdaIrKotlinSteppingTestGenerated.java | 5 - ...nEvaluateExpressionInMppTestGenerated.java | 213 +++++++++++------- ...KotlinEvaluateExpressionTestGenerated.java | 213 +++++++++++------- ...onWithIRFragmentCompilerTestGenerated.java | 213 +++++++++++------- .../test/IrKotlinSteppingTestGenerated.java | 5 - ...nEvaluateExpressionInMppTestGenerated.java | 213 +++++++++++------- ...KotlinEvaluateExpressionTestGenerated.java | 213 +++++++++++------- ...1IdeK2CodeKotlinSteppingTestGenerated.java | 5 - .../stepOut/stepOutOfSingleSuspendCall.kt | 37 +++ .../stepOut/stepOutOfSingleSuspendCall.out | 12 + .../stepOut/stepOutSeveralSuspendFrames.kt | 46 ++++ .../stepOut/stepOutSeveralSuspendFrames.out | 12 + ...utSeveralSuspendFramesSeveralCoroutines.kt | 53 +++++ ...tSeveralSuspendFramesSeveralCoroutines.out | 13 ++ .../stepOut/stepOutWithException.kt | 36 +++ .../stepOut/stepOutWithException.out | 26 +++ .../stepOutTailCallOptimization.kt} | 14 +- .../stepOutTailCallOptimization.out | 8 + .../stepping/stepOut/souSuspendFun.out | 12 - 26 files changed, 1176 insertions(+), 644 deletions(-) create mode 100644 plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt create mode 100644 plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.out create mode 100644 plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt create mode 100644 plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.out create mode 100644 plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt create mode 100644 plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.out create mode 100644 plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt create mode 100644 plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.out rename plugins/kotlin/jvm-debugger/test/testData/{stepping/stepOut/souSuspendFun.kt => evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt} (72%) create mode 100644 plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.out delete mode 100644 plugins/kotlin/jvm-debugger/test/testData/stepping/stepOut/souSuspendFun.out diff --git a/plugins/kotlin/jvm-debugger/core/src/org/jetbrains/kotlin/idea/debugger/core/stepping/KotlinStepActionFactory.kt b/plugins/kotlin/jvm-debugger/core/src/org/jetbrains/kotlin/idea/debugger/core/stepping/KotlinStepActionFactory.kt index b587a3b667fc..34d570810562 100644 --- a/plugins/kotlin/jvm-debugger/core/src/org/jetbrains/kotlin/idea/debugger/core/stepping/KotlinStepActionFactory.kt +++ b/plugins/kotlin/jvm-debugger/core/src/org/jetbrains/kotlin/idea/debugger/core/stepping/KotlinStepActionFactory.kt @@ -119,7 +119,7 @@ object KotlinStepActionFactory { // first check coroutines // TODO: it is better to move it somewhere else val method = DebuggerUtilsEx.getMethod(StackFrameInterceptor.instance?.callerLocation(suspendContext)) - if (method != null && method != getDirectCallerMethod(suspendContext.frameProxy)) { + if (method != null) { installCoroutineResumedBreakpoint(suspendContext, method) applyThreadFilter(getThreadFilterFromContext(suspendContext)) // call ResumeCommand.contextAction directly: if createResumeCommand is used, it will also reset thread filter @@ -157,23 +157,4 @@ object KotlinStepActionFactory { } return null } - - private fun getDirectCallerMethod(frame: StackFrameProxyImpl?): Method? { - if (frame != null) { - try { - val threadProxy = frame.threadProxy() - val callerIndex = frame.frameIndex + 1 - if (callerIndex >= threadProxy.frameCount()) { - return null - } - val callerFrame = threadProxy.frame(callerIndex) - if (callerFrame != null) { - return DebuggerUtilsEx.getMethod(callerFrame.location()) - } - } catch (e: EvaluateException) { - LOG.error(e) - } - } - return null - } } diff --git a/plugins/kotlin/jvm-debugger/coroutines/src/org/jetbrains/kotlin/idea/debugger/coroutine/CoroutineStackFrameInterceptor.kt b/plugins/kotlin/jvm-debugger/coroutines/src/org/jetbrains/kotlin/idea/debugger/coroutine/CoroutineStackFrameInterceptor.kt index f62b1c9221ce..179c21929d11 100644 --- a/plugins/kotlin/jvm-debugger/coroutines/src/org/jetbrains/kotlin/idea/debugger/coroutine/CoroutineStackFrameInterceptor.kt +++ b/plugins/kotlin/jvm-debugger/coroutines/src/org/jetbrains/kotlin/idea/debugger/coroutine/CoroutineStackFrameInterceptor.kt @@ -120,8 +120,9 @@ class CoroutineStackFrameInterceptor : StackFrameInterceptor { val suspendExitMode = frameProxy.location().getSuspendExitMode() return when (suspendExitMode) { SuspendExitMode.SUSPEND_LAMBDA -> frameProxy.thisVariableValue() - // completionVariableValue seems wrong here - SuspendExitMode.SUSPEND_METHOD_PARAMETER -> /*frameProxy.completionVariableValue() ?:*/ frameProxy.continuationVariableValue() + // If the final call within a function body is a suspend call, and it's the only suspend call, + // then tail call optimization is applied, and no state machine is generated, hence only completion variable is available. + SuspendExitMode.SUSPEND_METHOD_PARAMETER -> frameProxy.continuationVariableValue() ?: frameProxy.completionVariableValue() else -> null } } @@ -131,7 +132,9 @@ class CoroutineStackFrameInterceptor : StackFrameInterceptor { val continuationObject = extractContinuation(frameProxy) ?: return null val executionContext = DefaultExecutionContext(suspendContext, frameProxy) val debugMetadata = DebugMetadata.instance(executionContext) ?: return null - val completionObject = debugMetadata.baseContinuationImpl.getNextContinuation(continuationObject, 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) } diff --git a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK1CodeKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK1CodeKotlinSteppingTestGenerated.java index 8724e8b86ccd..150ce5052a9c 100644 --- a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK1CodeKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK1CodeKotlinSteppingTestGenerated.java @@ -364,11 +364,6 @@ public abstract class K2IdeK1CodeKotlinSteppingTestGenerated extends AbstractK2I runTest("../testData/stepping/stepOut/inapplicableFieldWatchpoints.kt"); } - @TestMetadata("souSuspendFun.kt") - public void testSouSuspendFun() throws Exception { - runTest("../testData/stepping/stepOut/souSuspendFun.kt"); - } - @TestMetadata("stepOutFromInlineFunctionThenResume.kt") public void testStepOutFromInlineFunctionThenResume() throws Exception { runTest("../testData/stepping/stepOut/stepOutFromInlineFunctionThenResume.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinEvaluateExpressionTestGenerated.java b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinEvaluateExpressionTestGenerated.java index c89be65af166..e0255bd35dfe 100644 --- a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinEvaluateExpressionTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinEvaluateExpressionTestGenerated.java @@ -242,109 +242,158 @@ public abstract class K2IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("../testData/evaluation/singleBreakpoint/coroutines") - public static class Coroutines extends AbstractK2IdeK2CodeKotlinEvaluateExpressionTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + public abstract static class Coroutines extends AbstractK2IdeK2CodeKotlinEvaluateExpressionTest { + @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 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @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("stepOutSeveralSuspendFramesSeveralCoroutines.kt") + public void testStepOutSeveralSuspendFramesSeveralCoroutines() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt"); + } + + @TestMetadata("stepOutWithException.kt") + public void testStepOutWithException() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported") + public static class Unsupported extends AbstractK2IdeK2CodeKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @TestMetadata("stepOutTailCallOptimization.kt") + public void testStepOutTailCallOptimization() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt"); + } + } } - @TestMetadata("accessClassPropertyInSuspendFunction.kt") - public void testAccessClassPropertyInSuspendFunction() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); - } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../testData/evaluation/singleBreakpoint/coroutines") + public static class Uncategorized extends AbstractK2IdeK2CodeKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } - @TestMetadata("anyUpdateInvokeStatic.kt") - public void testAnyUpdateInvokeStatic() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); - } + @TestMetadata("accessClassPropertyInSuspendFunction.kt") + public void testAccessClassPropertyInSuspendFunction() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); + } - @TestMetadata("anyUpdateVariable.kt") - public void testAnyUpdateVariable() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); - } + @TestMetadata("anyUpdateInvokeStatic.kt") + public void testAnyUpdateInvokeStatic() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); + } - @TestMetadata("capturedReceiverName.kt") - public void testCapturedReceiverName() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); - } + @TestMetadata("anyUpdateVariable.kt") + public void testAnyUpdateVariable() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); + } - @TestMetadata("coroutineContextExists.kt") - public void testCoroutineContextExists() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); - } + @TestMetadata("capturedReceiverName.kt") + public void testCapturedReceiverName() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); + } - @TestMetadata("coroutineScopeReceiver.kt") - public void testCoroutineScopeReceiver() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); - } + @TestMetadata("coroutineContextExists.kt") + public void testCoroutineContextExists() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); + } - @TestMetadata("functionCallWithSuspendFunctionInside.kt") - public void testFunctionCallWithSuspendFunctionInside() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); - } + @TestMetadata("coroutineScopeReceiver.kt") + public void testCoroutineScopeReceiver() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); + } - @TestMetadata("infixSuspendCall.kt") - public void testInfixSuspendCall() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); - } + @TestMetadata("functionCallWithSuspendFunctionInside.kt") + public void testFunctionCallWithSuspendFunctionInside() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); + } - @TestMetadata("operatorSuspendCall.kt") - public void testOperatorSuspendCall() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); - } + @TestMetadata("infixSuspendCall.kt") + public void testInfixSuspendCall() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); + } - @TestMetadata("primitivesCoertion.kt") - public void testPrimitivesCoertion() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); - } + @TestMetadata("operatorSuspendCall.kt") + public void testOperatorSuspendCall() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); + } - @TestMetadata("stringUpdateInvokeStatic.kt") - public void testStringUpdateInvokeStatic() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); - } + @TestMetadata("primitivesCoertion.kt") + public void testPrimitivesCoertion() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); + } - @TestMetadata("stringUpdateInvokeVirtual.kt") - public void testStringUpdateInvokeVirtual() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); - } + @TestMetadata("stringUpdateInvokeStatic.kt") + public void testStringUpdateInvokeStatic() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); + } - @TestMetadata("stringUpdatePutField.kt") - public void testStringUpdatePutField() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); - } + @TestMetadata("stringUpdateInvokeVirtual.kt") + public void testStringUpdateInvokeVirtual() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); + } - @TestMetadata("stringUpdateVariable.kt") - public void testStringUpdateVariable() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); - } + @TestMetadata("stringUpdatePutField.kt") + public void testStringUpdatePutField() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); + } - @TestMetadata("suspendFunctionInClass.kt") - public void testSuspendFunctionInClass() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); - } + @TestMetadata("stringUpdateVariable.kt") + public void testStringUpdateVariable() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); + } - @TestMetadata("suspendFunctionWithInlineClass.kt") - public void testSuspendFunctionWithInlineClass() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); - } + @TestMetadata("suspendFunctionInClass.kt") + public void testSuspendFunctionInClass() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); + } - @TestMetadata("suspendFunctionsWithContext.kt") - public void testSuspendFunctionsWithContext() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); - } + @TestMetadata("suspendFunctionWithInlineClass.kt") + public void testSuspendFunctionWithInlineClass() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); + } - @TestMetadata("suspendFunctionsWithoutContext.kt") - public void testSuspendFunctionsWithoutContext() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); - } + @TestMetadata("suspendFunctionsWithContext.kt") + public void testSuspendFunctionsWithContext() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); + } - @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") - public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); - } + @TestMetadata("suspendFunctionsWithoutContext.kt") + public void testSuspendFunctionsWithoutContext() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); + } - @TestMetadata("uncapturedVariableInSuspendLambda.kt") - public void testUncapturedVariableInSuspendLambda() throws Exception { - runTest("../testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") + public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); + } + + @TestMetadata("uncapturedVariableInSuspendLambda.kt") + public void testUncapturedVariableInSuspendLambda() throws Exception { + runTest("../testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + } } } diff --git a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinSteppingTestGenerated.java index 5e63f7b11ebc..0ada96d79a10 100644 --- a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IdeK2CodeKotlinSteppingTestGenerated.java @@ -364,11 +364,6 @@ public abstract class K2IdeK2CodeKotlinSteppingTestGenerated extends AbstractK2I runTest("../testData/stepping/stepOut/inapplicableFieldWatchpoints.kt"); } - @TestMetadata("souSuspendFun.kt") - public void testSouSuspendFun() throws Exception { - runTest("../testData/stepping/stepOut/souSuspendFun.kt"); - } - @TestMetadata("stepOutFromInlineFunctionThenResume.kt") public void testStepOutFromInlineFunctionThenResume() throws Exception { runTest("../testData/stepping/stepOut/stepOutFromInlineFunctionThenResume.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IndyLambdaKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IndyLambdaKotlinSteppingTestGenerated.java index 6013027d2d2c..550f9925b77a 100644 --- a/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IndyLambdaKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/k2/test/org/jetbrains/kotlin/idea/k2/debugger/test/cases/K2IndyLambdaKotlinSteppingTestGenerated.java @@ -364,11 +364,6 @@ public abstract class K2IndyLambdaKotlinSteppingTestGenerated extends AbstractK2 runTest("../testData/stepping/stepOut/inapplicableFieldWatchpoints.kt"); } - @TestMetadata("souSuspendFun.kt") - public void testSouSuspendFun() throws Exception { - runTest("../testData/stepping/stepOut/souSuspendFun.kt"); - } - @TestMetadata("stepOutFromInlineFunctionThenResume.kt") public void testStepOutFromInlineFunctionThenResume() throws Exception { runTest("../testData/stepping/stepOut/stepOutFromInlineFunctionThenResume.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinEvaluateExpressionTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinEvaluateExpressionTestGenerated.java index d8941462d93a..b808e392cc42 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinEvaluateExpressionTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinEvaluateExpressionTestGenerated.java @@ -242,109 +242,158 @@ public abstract class IndyLambdaIrKotlinEvaluateExpressionTestGenerated extends @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") - public static class Coroutines extends AbstractIndyLambdaIrKotlinEvaluateExpressionTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + public abstract static class Coroutines extends AbstractIndyLambdaIrKotlinEvaluateExpressionTest { + @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 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @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("stepOutSeveralSuspendFramesSeveralCoroutines.kt") + public void testStepOutSeveralSuspendFramesSeveralCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt"); + } + + @TestMetadata("stepOutWithException.kt") + public void testStepOutWithException() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported") + public static class Unsupported extends AbstractIndyLambdaIrKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @TestMetadata("stepOutTailCallOptimization.kt") + public void testStepOutTailCallOptimization() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt"); + } + } } - @TestMetadata("accessClassPropertyInSuspendFunction.kt") - public void testAccessClassPropertyInSuspendFunction() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); - } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") + public static class Uncategorized extends AbstractIndyLambdaIrKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } - @TestMetadata("anyUpdateInvokeStatic.kt") - public void testAnyUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); - } + @TestMetadata("accessClassPropertyInSuspendFunction.kt") + public void testAccessClassPropertyInSuspendFunction() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); + } - @TestMetadata("anyUpdateVariable.kt") - public void testAnyUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); - } + @TestMetadata("anyUpdateInvokeStatic.kt") + public void testAnyUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); + } - @TestMetadata("capturedReceiverName.kt") - public void testCapturedReceiverName() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); - } + @TestMetadata("anyUpdateVariable.kt") + public void testAnyUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); + } - @TestMetadata("coroutineContextExists.kt") - public void testCoroutineContextExists() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); - } + @TestMetadata("capturedReceiverName.kt") + public void testCapturedReceiverName() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); + } - @TestMetadata("coroutineScopeReceiver.kt") - public void testCoroutineScopeReceiver() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); - } + @TestMetadata("coroutineContextExists.kt") + public void testCoroutineContextExists() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); + } - @TestMetadata("functionCallWithSuspendFunctionInside.kt") - public void testFunctionCallWithSuspendFunctionInside() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); - } + @TestMetadata("coroutineScopeReceiver.kt") + public void testCoroutineScopeReceiver() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); + } - @TestMetadata("infixSuspendCall.kt") - public void testInfixSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); - } + @TestMetadata("functionCallWithSuspendFunctionInside.kt") + public void testFunctionCallWithSuspendFunctionInside() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); + } - @TestMetadata("operatorSuspendCall.kt") - public void testOperatorSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); - } + @TestMetadata("infixSuspendCall.kt") + public void testInfixSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); + } - @TestMetadata("primitivesCoertion.kt") - public void testPrimitivesCoertion() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); - } + @TestMetadata("operatorSuspendCall.kt") + public void testOperatorSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); + } - @TestMetadata("stringUpdateInvokeStatic.kt") - public void testStringUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); - } + @TestMetadata("primitivesCoertion.kt") + public void testPrimitivesCoertion() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); + } - @TestMetadata("stringUpdateInvokeVirtual.kt") - public void testStringUpdateInvokeVirtual() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); - } + @TestMetadata("stringUpdateInvokeStatic.kt") + public void testStringUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); + } - @TestMetadata("stringUpdatePutField.kt") - public void testStringUpdatePutField() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); - } + @TestMetadata("stringUpdateInvokeVirtual.kt") + public void testStringUpdateInvokeVirtual() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); + } - @TestMetadata("stringUpdateVariable.kt") - public void testStringUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); - } + @TestMetadata("stringUpdatePutField.kt") + public void testStringUpdatePutField() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); + } - @TestMetadata("suspendFunctionInClass.kt") - public void testSuspendFunctionInClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); - } + @TestMetadata("stringUpdateVariable.kt") + public void testStringUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); + } - @TestMetadata("suspendFunctionWithInlineClass.kt") - public void testSuspendFunctionWithInlineClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); - } + @TestMetadata("suspendFunctionInClass.kt") + public void testSuspendFunctionInClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); + } - @TestMetadata("suspendFunctionsWithContext.kt") - public void testSuspendFunctionsWithContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); - } + @TestMetadata("suspendFunctionWithInlineClass.kt") + public void testSuspendFunctionWithInlineClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); + } - @TestMetadata("suspendFunctionsWithoutContext.kt") - public void testSuspendFunctionsWithoutContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); - } + @TestMetadata("suspendFunctionsWithContext.kt") + public void testSuspendFunctionsWithContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); + } - @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") - public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); - } + @TestMetadata("suspendFunctionsWithoutContext.kt") + public void testSuspendFunctionsWithoutContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); + } - @TestMetadata("uncapturedVariableInSuspendLambda.kt") - public void testUncapturedVariableInSuspendLambda() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") + public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); + } + + @TestMetadata("uncapturedVariableInSuspendLambda.kt") + public void testUncapturedVariableInSuspendLambda() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + } } } diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinSteppingTestGenerated.java index 9b0f82419b17..a535f27df280 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IndyLambdaIrKotlinSteppingTestGenerated.java @@ -364,11 +364,6 @@ public abstract class IndyLambdaIrKotlinSteppingTestGenerated extends AbstractIn runTest("testData/stepping/stepOut/inapplicableFieldWatchpoints.kt"); } - @TestMetadata("souSuspendFun.kt") - public void testSouSuspendFun() throws Exception { - runTest("testData/stepping/stepOut/souSuspendFun.kt"); - } - @TestMetadata("stepOutFromInlineFunctionThenResume.kt") public void testStepOutFromInlineFunctionThenResume() throws Exception { runTest("testData/stepping/stepOut/stepOutFromInlineFunctionThenResume.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionInMppTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionInMppTestGenerated.java index 0ecd080711f1..a9c6bee99698 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionInMppTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionInMppTestGenerated.java @@ -242,109 +242,158 @@ public abstract class IrKotlinEvaluateExpressionInMppTestGenerated extends Abstr @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") - public static class Coroutines extends AbstractIrKotlinEvaluateExpressionInMppTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + public abstract static class Coroutines extends AbstractIrKotlinEvaluateExpressionInMppTest { + @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 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @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("stepOutSeveralSuspendFramesSeveralCoroutines.kt") + public void testStepOutSeveralSuspendFramesSeveralCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt"); + } + + @TestMetadata("stepOutWithException.kt") + public void testStepOutWithException() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported") + public static class Unsupported extends AbstractIrKotlinEvaluateExpressionInMppTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @TestMetadata("stepOutTailCallOptimization.kt") + public void testStepOutTailCallOptimization() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt"); + } + } } - @TestMetadata("accessClassPropertyInSuspendFunction.kt") - public void testAccessClassPropertyInSuspendFunction() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); - } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") + public static class Uncategorized extends AbstractIrKotlinEvaluateExpressionInMppTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } - @TestMetadata("anyUpdateInvokeStatic.kt") - public void testAnyUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); - } + @TestMetadata("accessClassPropertyInSuspendFunction.kt") + public void testAccessClassPropertyInSuspendFunction() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); + } - @TestMetadata("anyUpdateVariable.kt") - public void testAnyUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); - } + @TestMetadata("anyUpdateInvokeStatic.kt") + public void testAnyUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); + } - @TestMetadata("capturedReceiverName.kt") - public void testCapturedReceiverName() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); - } + @TestMetadata("anyUpdateVariable.kt") + public void testAnyUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); + } - @TestMetadata("coroutineContextExists.kt") - public void testCoroutineContextExists() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); - } + @TestMetadata("capturedReceiverName.kt") + public void testCapturedReceiverName() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); + } - @TestMetadata("coroutineScopeReceiver.kt") - public void testCoroutineScopeReceiver() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); - } + @TestMetadata("coroutineContextExists.kt") + public void testCoroutineContextExists() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); + } - @TestMetadata("functionCallWithSuspendFunctionInside.kt") - public void testFunctionCallWithSuspendFunctionInside() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); - } + @TestMetadata("coroutineScopeReceiver.kt") + public void testCoroutineScopeReceiver() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); + } - @TestMetadata("infixSuspendCall.kt") - public void testInfixSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); - } + @TestMetadata("functionCallWithSuspendFunctionInside.kt") + public void testFunctionCallWithSuspendFunctionInside() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); + } - @TestMetadata("operatorSuspendCall.kt") - public void testOperatorSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); - } + @TestMetadata("infixSuspendCall.kt") + public void testInfixSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); + } - @TestMetadata("primitivesCoertion.kt") - public void testPrimitivesCoertion() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); - } + @TestMetadata("operatorSuspendCall.kt") + public void testOperatorSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); + } - @TestMetadata("stringUpdateInvokeStatic.kt") - public void testStringUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); - } + @TestMetadata("primitivesCoertion.kt") + public void testPrimitivesCoertion() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); + } - @TestMetadata("stringUpdateInvokeVirtual.kt") - public void testStringUpdateInvokeVirtual() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); - } + @TestMetadata("stringUpdateInvokeStatic.kt") + public void testStringUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); + } - @TestMetadata("stringUpdatePutField.kt") - public void testStringUpdatePutField() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); - } + @TestMetadata("stringUpdateInvokeVirtual.kt") + public void testStringUpdateInvokeVirtual() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); + } - @TestMetadata("stringUpdateVariable.kt") - public void testStringUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); - } + @TestMetadata("stringUpdatePutField.kt") + public void testStringUpdatePutField() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); + } - @TestMetadata("suspendFunctionInClass.kt") - public void testSuspendFunctionInClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); - } + @TestMetadata("stringUpdateVariable.kt") + public void testStringUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); + } - @TestMetadata("suspendFunctionWithInlineClass.kt") - public void testSuspendFunctionWithInlineClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); - } + @TestMetadata("suspendFunctionInClass.kt") + public void testSuspendFunctionInClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); + } - @TestMetadata("suspendFunctionsWithContext.kt") - public void testSuspendFunctionsWithContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); - } + @TestMetadata("suspendFunctionWithInlineClass.kt") + public void testSuspendFunctionWithInlineClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); + } - @TestMetadata("suspendFunctionsWithoutContext.kt") - public void testSuspendFunctionsWithoutContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); - } + @TestMetadata("suspendFunctionsWithContext.kt") + public void testSuspendFunctionsWithContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); + } - @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") - public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); - } + @TestMetadata("suspendFunctionsWithoutContext.kt") + public void testSuspendFunctionsWithoutContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); + } - @TestMetadata("uncapturedVariableInSuspendLambda.kt") - public void testUncapturedVariableInSuspendLambda() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") + public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); + } + + @TestMetadata("uncapturedVariableInSuspendLambda.kt") + public void testUncapturedVariableInSuspendLambda() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + } } } diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionTestGenerated.java index 721647e7664b..84c9d5134cd3 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionTestGenerated.java @@ -242,109 +242,158 @@ public abstract class IrKotlinEvaluateExpressionTestGenerated extends AbstractIr @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") - public static class Coroutines extends AbstractIrKotlinEvaluateExpressionTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_OLD_EVALUATOR, testDataFilePath); + public abstract static class Coroutines extends AbstractIrKotlinEvaluateExpressionTest { + @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 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_OLD_EVALUATOR, testDataFilePath); + } + + @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("stepOutSeveralSuspendFramesSeveralCoroutines.kt") + public void testStepOutSeveralSuspendFramesSeveralCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt"); + } + + @TestMetadata("stepOutWithException.kt") + public void testStepOutWithException() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported") + public static class Unsupported extends AbstractIrKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_OLD_EVALUATOR, testDataFilePath); + } + + @TestMetadata("stepOutTailCallOptimization.kt") + public void testStepOutTailCallOptimization() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt"); + } + } } - @TestMetadata("accessClassPropertyInSuspendFunction.kt") - public void testAccessClassPropertyInSuspendFunction() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); - } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") + public static class Uncategorized extends AbstractIrKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_OLD_EVALUATOR, testDataFilePath); + } - @TestMetadata("anyUpdateInvokeStatic.kt") - public void testAnyUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); - } + @TestMetadata("accessClassPropertyInSuspendFunction.kt") + public void testAccessClassPropertyInSuspendFunction() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); + } - @TestMetadata("anyUpdateVariable.kt") - public void testAnyUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); - } + @TestMetadata("anyUpdateInvokeStatic.kt") + public void testAnyUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); + } - @TestMetadata("capturedReceiverName.kt") - public void testCapturedReceiverName() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); - } + @TestMetadata("anyUpdateVariable.kt") + public void testAnyUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); + } - @TestMetadata("coroutineContextExists.kt") - public void testCoroutineContextExists() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); - } + @TestMetadata("capturedReceiverName.kt") + public void testCapturedReceiverName() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); + } - @TestMetadata("coroutineScopeReceiver.kt") - public void testCoroutineScopeReceiver() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); - } + @TestMetadata("coroutineContextExists.kt") + public void testCoroutineContextExists() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); + } - @TestMetadata("functionCallWithSuspendFunctionInside.kt") - public void testFunctionCallWithSuspendFunctionInside() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); - } + @TestMetadata("coroutineScopeReceiver.kt") + public void testCoroutineScopeReceiver() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); + } - @TestMetadata("infixSuspendCall.kt") - public void testInfixSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); - } + @TestMetadata("functionCallWithSuspendFunctionInside.kt") + public void testFunctionCallWithSuspendFunctionInside() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); + } - @TestMetadata("operatorSuspendCall.kt") - public void testOperatorSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); - } + @TestMetadata("infixSuspendCall.kt") + public void testInfixSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); + } - @TestMetadata("primitivesCoertion.kt") - public void testPrimitivesCoertion() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); - } + @TestMetadata("operatorSuspendCall.kt") + public void testOperatorSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); + } - @TestMetadata("stringUpdateInvokeStatic.kt") - public void testStringUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); - } + @TestMetadata("primitivesCoertion.kt") + public void testPrimitivesCoertion() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); + } - @TestMetadata("stringUpdateInvokeVirtual.kt") - public void testStringUpdateInvokeVirtual() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); - } + @TestMetadata("stringUpdateInvokeStatic.kt") + public void testStringUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); + } - @TestMetadata("stringUpdatePutField.kt") - public void testStringUpdatePutField() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); - } + @TestMetadata("stringUpdateInvokeVirtual.kt") + public void testStringUpdateInvokeVirtual() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); + } - @TestMetadata("stringUpdateVariable.kt") - public void testStringUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); - } + @TestMetadata("stringUpdatePutField.kt") + public void testStringUpdatePutField() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); + } - @TestMetadata("suspendFunctionInClass.kt") - public void testSuspendFunctionInClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); - } + @TestMetadata("stringUpdateVariable.kt") + public void testStringUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); + } - @TestMetadata("suspendFunctionWithInlineClass.kt") - public void testSuspendFunctionWithInlineClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); - } + @TestMetadata("suspendFunctionInClass.kt") + public void testSuspendFunctionInClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); + } - @TestMetadata("suspendFunctionsWithContext.kt") - public void testSuspendFunctionsWithContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); - } + @TestMetadata("suspendFunctionWithInlineClass.kt") + public void testSuspendFunctionWithInlineClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); + } - @TestMetadata("suspendFunctionsWithoutContext.kt") - public void testSuspendFunctionsWithoutContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); - } + @TestMetadata("suspendFunctionsWithContext.kt") + public void testSuspendFunctionsWithContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); + } - @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") - public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); - } + @TestMetadata("suspendFunctionsWithoutContext.kt") + public void testSuspendFunctionsWithoutContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); + } - @TestMetadata("uncapturedVariableInSuspendLambda.kt") - public void testUncapturedVariableInSuspendLambda() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") + public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); + } + + @TestMetadata("uncapturedVariableInSuspendLambda.kt") + public void testUncapturedVariableInSuspendLambda() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + } } } diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenerated.java index a4af5e504135..962604559b59 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenerated.java @@ -242,109 +242,158 @@ public abstract class IrKotlinEvaluateExpressionWithIRFragmentCompilerTestGenera @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") - public static class Coroutines extends AbstractIrKotlinEvaluateExpressionWithIRFragmentCompilerTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + public abstract static class Coroutines extends AbstractIrKotlinEvaluateExpressionWithIRFragmentCompilerTest { + @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 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @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("stepOutSeveralSuspendFramesSeveralCoroutines.kt") + public void testStepOutSeveralSuspendFramesSeveralCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt"); + } + + @TestMetadata("stepOutWithException.kt") + public void testStepOutWithException() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported") + public static class Unsupported extends AbstractIrKotlinEvaluateExpressionWithIRFragmentCompilerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @TestMetadata("stepOutTailCallOptimization.kt") + public void testStepOutTailCallOptimization() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt"); + } + } } - @TestMetadata("accessClassPropertyInSuspendFunction.kt") - public void testAccessClassPropertyInSuspendFunction() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); - } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") + public static class Uncategorized extends AbstractIrKotlinEvaluateExpressionWithIRFragmentCompilerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } - @TestMetadata("anyUpdateInvokeStatic.kt") - public void testAnyUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); - } + @TestMetadata("accessClassPropertyInSuspendFunction.kt") + public void testAccessClassPropertyInSuspendFunction() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); + } - @TestMetadata("anyUpdateVariable.kt") - public void testAnyUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); - } + @TestMetadata("anyUpdateInvokeStatic.kt") + public void testAnyUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); + } - @TestMetadata("capturedReceiverName.kt") - public void testCapturedReceiverName() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); - } + @TestMetadata("anyUpdateVariable.kt") + public void testAnyUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); + } - @TestMetadata("coroutineContextExists.kt") - public void testCoroutineContextExists() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); - } + @TestMetadata("capturedReceiverName.kt") + public void testCapturedReceiverName() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); + } - @TestMetadata("coroutineScopeReceiver.kt") - public void testCoroutineScopeReceiver() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); - } + @TestMetadata("coroutineContextExists.kt") + public void testCoroutineContextExists() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); + } - @TestMetadata("functionCallWithSuspendFunctionInside.kt") - public void testFunctionCallWithSuspendFunctionInside() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); - } + @TestMetadata("coroutineScopeReceiver.kt") + public void testCoroutineScopeReceiver() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); + } - @TestMetadata("infixSuspendCall.kt") - public void testInfixSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); - } + @TestMetadata("functionCallWithSuspendFunctionInside.kt") + public void testFunctionCallWithSuspendFunctionInside() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); + } - @TestMetadata("operatorSuspendCall.kt") - public void testOperatorSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); - } + @TestMetadata("infixSuspendCall.kt") + public void testInfixSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); + } - @TestMetadata("primitivesCoertion.kt") - public void testPrimitivesCoertion() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); - } + @TestMetadata("operatorSuspendCall.kt") + public void testOperatorSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); + } - @TestMetadata("stringUpdateInvokeStatic.kt") - public void testStringUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); - } + @TestMetadata("primitivesCoertion.kt") + public void testPrimitivesCoertion() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); + } - @TestMetadata("stringUpdateInvokeVirtual.kt") - public void testStringUpdateInvokeVirtual() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); - } + @TestMetadata("stringUpdateInvokeStatic.kt") + public void testStringUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); + } - @TestMetadata("stringUpdatePutField.kt") - public void testStringUpdatePutField() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); - } + @TestMetadata("stringUpdateInvokeVirtual.kt") + public void testStringUpdateInvokeVirtual() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); + } - @TestMetadata("stringUpdateVariable.kt") - public void testStringUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); - } + @TestMetadata("stringUpdatePutField.kt") + public void testStringUpdatePutField() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); + } - @TestMetadata("suspendFunctionInClass.kt") - public void testSuspendFunctionInClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); - } + @TestMetadata("stringUpdateVariable.kt") + public void testStringUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); + } - @TestMetadata("suspendFunctionWithInlineClass.kt") - public void testSuspendFunctionWithInlineClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); - } + @TestMetadata("suspendFunctionInClass.kt") + public void testSuspendFunctionInClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); + } - @TestMetadata("suspendFunctionsWithContext.kt") - public void testSuspendFunctionsWithContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); - } + @TestMetadata("suspendFunctionWithInlineClass.kt") + public void testSuspendFunctionWithInlineClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); + } - @TestMetadata("suspendFunctionsWithoutContext.kt") - public void testSuspendFunctionsWithoutContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); - } + @TestMetadata("suspendFunctionsWithContext.kt") + public void testSuspendFunctionsWithContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); + } - @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") - public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); - } + @TestMetadata("suspendFunctionsWithoutContext.kt") + public void testSuspendFunctionsWithoutContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); + } - @TestMetadata("uncapturedVariableInSuspendLambda.kt") - public void testUncapturedVariableInSuspendLambda() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") + public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); + } + + @TestMetadata("uncapturedVariableInSuspendLambda.kt") + public void testUncapturedVariableInSuspendLambda() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + } } } diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinSteppingTestGenerated.java index 6d147c73eed2..4986dd149c9c 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/IrKotlinSteppingTestGenerated.java @@ -364,11 +364,6 @@ public abstract class IrKotlinSteppingTestGenerated extends AbstractIrKotlinStep runTest("testData/stepping/stepOut/inapplicableFieldWatchpoints.kt"); } - @TestMetadata("souSuspendFun.kt") - public void testSouSuspendFun() throws Exception { - runTest("testData/stepping/stepOut/souSuspendFun.kt"); - } - @TestMetadata("stepOutFromInlineFunctionThenResume.kt") public void testStepOutFromInlineFunctionThenResume() throws Exception { runTest("testData/stepping/stepOut/stepOutFromInlineFunctionThenResume.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated.java index 40fbb9d6c817..64ac2492b1af 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated.java @@ -242,109 +242,158 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionInMppTestGenerated exte @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") - public static class Coroutines extends AbstractK1IdeK2CodeKotlinEvaluateExpressionInMppTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + public abstract static class Coroutines extends AbstractK1IdeK2CodeKotlinEvaluateExpressionInMppTest { + @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 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @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("stepOutSeveralSuspendFramesSeveralCoroutines.kt") + public void testStepOutSeveralSuspendFramesSeveralCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt"); + } + + @TestMetadata("stepOutWithException.kt") + public void testStepOutWithException() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported") + public static class Unsupported extends AbstractK1IdeK2CodeKotlinEvaluateExpressionInMppTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @TestMetadata("stepOutTailCallOptimization.kt") + public void testStepOutTailCallOptimization() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt"); + } + } } - @TestMetadata("accessClassPropertyInSuspendFunction.kt") - public void testAccessClassPropertyInSuspendFunction() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); - } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") + public static class Uncategorized extends AbstractK1IdeK2CodeKotlinEvaluateExpressionInMppTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } - @TestMetadata("anyUpdateInvokeStatic.kt") - public void testAnyUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); - } + @TestMetadata("accessClassPropertyInSuspendFunction.kt") + public void testAccessClassPropertyInSuspendFunction() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); + } - @TestMetadata("anyUpdateVariable.kt") - public void testAnyUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); - } + @TestMetadata("anyUpdateInvokeStatic.kt") + public void testAnyUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); + } - @TestMetadata("capturedReceiverName.kt") - public void testCapturedReceiverName() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); - } + @TestMetadata("anyUpdateVariable.kt") + public void testAnyUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); + } - @TestMetadata("coroutineContextExists.kt") - public void testCoroutineContextExists() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); - } + @TestMetadata("capturedReceiverName.kt") + public void testCapturedReceiverName() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); + } - @TestMetadata("coroutineScopeReceiver.kt") - public void testCoroutineScopeReceiver() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); - } + @TestMetadata("coroutineContextExists.kt") + public void testCoroutineContextExists() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); + } - @TestMetadata("functionCallWithSuspendFunctionInside.kt") - public void testFunctionCallWithSuspendFunctionInside() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); - } + @TestMetadata("coroutineScopeReceiver.kt") + public void testCoroutineScopeReceiver() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); + } - @TestMetadata("infixSuspendCall.kt") - public void testInfixSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); - } + @TestMetadata("functionCallWithSuspendFunctionInside.kt") + public void testFunctionCallWithSuspendFunctionInside() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); + } - @TestMetadata("operatorSuspendCall.kt") - public void testOperatorSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); - } + @TestMetadata("infixSuspendCall.kt") + public void testInfixSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); + } - @TestMetadata("primitivesCoertion.kt") - public void testPrimitivesCoertion() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); - } + @TestMetadata("operatorSuspendCall.kt") + public void testOperatorSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); + } - @TestMetadata("stringUpdateInvokeStatic.kt") - public void testStringUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); - } + @TestMetadata("primitivesCoertion.kt") + public void testPrimitivesCoertion() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); + } - @TestMetadata("stringUpdateInvokeVirtual.kt") - public void testStringUpdateInvokeVirtual() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); - } + @TestMetadata("stringUpdateInvokeStatic.kt") + public void testStringUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); + } - @TestMetadata("stringUpdatePutField.kt") - public void testStringUpdatePutField() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); - } + @TestMetadata("stringUpdateInvokeVirtual.kt") + public void testStringUpdateInvokeVirtual() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); + } - @TestMetadata("stringUpdateVariable.kt") - public void testStringUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); - } + @TestMetadata("stringUpdatePutField.kt") + public void testStringUpdatePutField() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); + } - @TestMetadata("suspendFunctionInClass.kt") - public void testSuspendFunctionInClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); - } + @TestMetadata("stringUpdateVariable.kt") + public void testStringUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); + } - @TestMetadata("suspendFunctionWithInlineClass.kt") - public void testSuspendFunctionWithInlineClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); - } + @TestMetadata("suspendFunctionInClass.kt") + public void testSuspendFunctionInClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); + } - @TestMetadata("suspendFunctionsWithContext.kt") - public void testSuspendFunctionsWithContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); - } + @TestMetadata("suspendFunctionWithInlineClass.kt") + public void testSuspendFunctionWithInlineClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); + } - @TestMetadata("suspendFunctionsWithoutContext.kt") - public void testSuspendFunctionsWithoutContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); - } + @TestMetadata("suspendFunctionsWithContext.kt") + public void testSuspendFunctionsWithContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); + } - @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") - public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); - } + @TestMetadata("suspendFunctionsWithoutContext.kt") + public void testSuspendFunctionsWithoutContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); + } - @TestMetadata("uncapturedVariableInSuspendLambda.kt") - public void testUncapturedVariableInSuspendLambda() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") + public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); + } + + @TestMetadata("uncapturedVariableInSuspendLambda.kt") + public void testUncapturedVariableInSuspendLambda() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + } } } diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinEvaluateExpressionTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinEvaluateExpressionTestGenerated.java index 8de7b015111e..5de9fb09be79 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinEvaluateExpressionTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinEvaluateExpressionTestGenerated.java @@ -242,109 +242,158 @@ public abstract class K1IdeK2CodeKotlinEvaluateExpressionTestGenerated extends A @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") - public static class Coroutines extends AbstractK1IdeK2CodeKotlinEvaluateExpressionTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + public abstract static class Coroutines extends AbstractK1IdeK2CodeKotlinEvaluateExpressionTest { + @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 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @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("stepOutSeveralSuspendFramesSeveralCoroutines.kt") + public void testStepOutSeveralSuspendFramesSeveralCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt"); + } + + @TestMetadata("stepOutWithException.kt") + public void testStepOutWithException() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported") + public static class Unsupported extends AbstractK1IdeK2CodeKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } + + @TestMetadata("stepOutTailCallOptimization.kt") + public void testStepOutTailCallOptimization() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt"); + } + } } - @TestMetadata("accessClassPropertyInSuspendFunction.kt") - public void testAccessClassPropertyInSuspendFunction() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); - } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/evaluation/singleBreakpoint/coroutines") + public static class Uncategorized extends AbstractK1IdeK2CodeKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, this, TargetBackend.JVM_IR_WITH_IR_EVALUATOR, testDataFilePath); + } - @TestMetadata("anyUpdateInvokeStatic.kt") - public void testAnyUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); - } + @TestMetadata("accessClassPropertyInSuspendFunction.kt") + public void testAccessClassPropertyInSuspendFunction() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/accessClassPropertyInSuspendFunction.kt"); + } - @TestMetadata("anyUpdateVariable.kt") - public void testAnyUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); - } + @TestMetadata("anyUpdateInvokeStatic.kt") + public void testAnyUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateInvokeStatic.kt"); + } - @TestMetadata("capturedReceiverName.kt") - public void testCapturedReceiverName() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); - } + @TestMetadata("anyUpdateVariable.kt") + public void testAnyUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/anyUpdateVariable.kt"); + } - @TestMetadata("coroutineContextExists.kt") - public void testCoroutineContextExists() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); - } + @TestMetadata("capturedReceiverName.kt") + public void testCapturedReceiverName() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/capturedReceiverName.kt"); + } - @TestMetadata("coroutineScopeReceiver.kt") - public void testCoroutineScopeReceiver() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); - } + @TestMetadata("coroutineContextExists.kt") + public void testCoroutineContextExists() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineContextExists.kt"); + } - @TestMetadata("functionCallWithSuspendFunctionInside.kt") - public void testFunctionCallWithSuspendFunctionInside() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); - } + @TestMetadata("coroutineScopeReceiver.kt") + public void testCoroutineScopeReceiver() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/coroutineScopeReceiver.kt"); + } - @TestMetadata("infixSuspendCall.kt") - public void testInfixSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); - } + @TestMetadata("functionCallWithSuspendFunctionInside.kt") + public void testFunctionCallWithSuspendFunctionInside() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/functionCallWithSuspendFunctionInside.kt"); + } - @TestMetadata("operatorSuspendCall.kt") - public void testOperatorSuspendCall() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); - } + @TestMetadata("infixSuspendCall.kt") + public void testInfixSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/infixSuspendCall.kt"); + } - @TestMetadata("primitivesCoertion.kt") - public void testPrimitivesCoertion() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); - } + @TestMetadata("operatorSuspendCall.kt") + public void testOperatorSuspendCall() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/operatorSuspendCall.kt"); + } - @TestMetadata("stringUpdateInvokeStatic.kt") - public void testStringUpdateInvokeStatic() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); - } + @TestMetadata("primitivesCoertion.kt") + public void testPrimitivesCoertion() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/primitivesCoertion.kt"); + } - @TestMetadata("stringUpdateInvokeVirtual.kt") - public void testStringUpdateInvokeVirtual() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); - } + @TestMetadata("stringUpdateInvokeStatic.kt") + public void testStringUpdateInvokeStatic() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeStatic.kt"); + } - @TestMetadata("stringUpdatePutField.kt") - public void testStringUpdatePutField() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); - } + @TestMetadata("stringUpdateInvokeVirtual.kt") + public void testStringUpdateInvokeVirtual() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateInvokeVirtual.kt"); + } - @TestMetadata("stringUpdateVariable.kt") - public void testStringUpdateVariable() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); - } + @TestMetadata("stringUpdatePutField.kt") + public void testStringUpdatePutField() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdatePutField.kt"); + } - @TestMetadata("suspendFunctionInClass.kt") - public void testSuspendFunctionInClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); - } + @TestMetadata("stringUpdateVariable.kt") + public void testStringUpdateVariable() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/stringUpdateVariable.kt"); + } - @TestMetadata("suspendFunctionWithInlineClass.kt") - public void testSuspendFunctionWithInlineClass() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); - } + @TestMetadata("suspendFunctionInClass.kt") + public void testSuspendFunctionInClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionInClass.kt"); + } - @TestMetadata("suspendFunctionsWithContext.kt") - public void testSuspendFunctionsWithContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); - } + @TestMetadata("suspendFunctionWithInlineClass.kt") + public void testSuspendFunctionWithInlineClass() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionWithInlineClass.kt"); + } - @TestMetadata("suspendFunctionsWithoutContext.kt") - public void testSuspendFunctionsWithoutContext() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); - } + @TestMetadata("suspendFunctionsWithContext.kt") + public void testSuspendFunctionsWithContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithContext.kt"); + } - @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") - public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); - } + @TestMetadata("suspendFunctionsWithoutContext.kt") + public void testSuspendFunctionsWithoutContext() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutContext.kt"); + } - @TestMetadata("uncapturedVariableInSuspendLambda.kt") - public void testUncapturedVariableInSuspendLambda() throws Exception { - runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + @TestMetadata("suspendFunctionsWithoutKotlinxCoroutines.kt") + public void testSuspendFunctionsWithoutKotlinxCoroutines() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/suspendFunctionsWithoutKotlinxCoroutines.kt"); + } + + @TestMetadata("uncapturedVariableInSuspendLambda.kt") + public void testUncapturedVariableInSuspendLambda() throws Exception { + runTest("testData/evaluation/singleBreakpoint/coroutines/uncapturedVariableInSuspendLambda.kt"); + } } } diff --git a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinSteppingTestGenerated.java b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinSteppingTestGenerated.java index 6d8b9fc78231..25c5fa759bcc 100644 --- a/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinSteppingTestGenerated.java +++ b/plugins/kotlin/jvm-debugger/test/test/org/jetbrains/kotlin/idea/debugger/test/K1IdeK2CodeKotlinSteppingTestGenerated.java @@ -364,11 +364,6 @@ public abstract class K1IdeK2CodeKotlinSteppingTestGenerated extends AbstractK1I runTest("testData/stepping/stepOut/inapplicableFieldWatchpoints.kt"); } - @TestMetadata("souSuspendFun.kt") - public void testSouSuspendFun() throws Exception { - runTest("testData/stepping/stepOut/souSuspendFun.kt"); - } - @TestMetadata("stepOutFromInlineFunctionThenResume.kt") public void testStepOutFromInlineFunctionThenResume() throws Exception { runTest("testData/stepping/stepOut/stepOutFromInlineFunctionThenResume.kt"); diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt new file mode 100644 index 000000000000..ed3dab878d0c --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.kt @@ -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 { + val x = funWithSuspendLast(i) + // EXPRESSION: i + // RESULT: 25: I + println("x = $x") + delay(1) + println("i = $i") + } + } + } +} + +suspend fun funWithSuspendLast(i: Int): Int { + if (i == 25) { + //Breakpoint! + return someInt() + } else { + return 10 + } +} + +suspend fun someInt(): Int { + delay(1) + return 42 +} + +// STEP_OUT: 1 +// STEP_OVER: 3 + +// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.out b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.out new file mode 100644 index 000000000000..623ab6a7f13a --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutOfSingleSuspendCall.out @@ -0,0 +1,12 @@ +LineBreakpoint created at stepOutOfSingleSuspendCall.kt:23 +Run Java +Connected to the target VM +stepOutOfSingleSuspendCall.kt:23 +stepOutOfSingleSuspendCall.kt:9 +stepOutOfSingleSuspendCall.kt:12 +stepOutOfSingleSuspendCall.kt:13 +stepOutOfSingleSuspendCall.kt:14 +Compile bytecode for i +Disconnected from the target VM + +Process finished with exit code 0 diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt new file mode 100644 index 000000000000..28549ab79e0a --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.kt @@ -0,0 +1,46 @@ +// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent + +package souSuspendFun + +import kotlinx.coroutines.* + +private fun foo(): Int { + //Breakpoint! + return 42 +} + +suspend fun fourth(): Int { + delay(1) + foo() + return 5 +} + +suspend fun third() : Int? { + delay(1) + val res = fourth() + println(res) + return res +} + +suspend fun second(): Int { + delay(1) + return third()?.let { return it } ?: 0 +} + +suspend fun first(): Int { + delay(1) + second() + return 12 +} + +fun main() { + runBlocking { + launch { + first() + } + } +} + +// STEP_OUT: 5 + +// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.out b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.out new file mode 100644 index 000000000000..93f964081e9c --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFrames.out @@ -0,0 +1,12 @@ +LineBreakpoint created at stepOutSeveralSuspendFrames.kt:9 +Run Java +Connected to the target VM +stepOutSeveralSuspendFrames.kt:9 +stepOutSeveralSuspendFrames.kt:14 +stepOutSeveralSuspendFrames.kt:20 +stepOutSeveralSuspendFrames.kt:27 +stepOutSeveralSuspendFrames.kt:33 +stepOutSeveralSuspendFrames.kt:40 +Disconnected from the target VM + +Process finished with exit code 0 diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt new file mode 100644 index 000000000000..feb18bcc54ed --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.kt @@ -0,0 +1,53 @@ +// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent + +package souSuspendFun + +import kotlinx.coroutines.* + +private fun foo(i: Int): Int { + if (i == 25) { + //Breakpoint! + return 42 + } + return -1 +} + +suspend fun fourth(i: Int): Int { + delay(1) + foo(i) + return 5 +} + +suspend fun third(i: Int) : Int? { + delay(1) + val res = fourth(i) + println(res) + return res +} + +suspend fun second(i: Int): Int { + delay(1) + return third(i)?.let { return it } ?: 0 +} + +suspend fun first(i: Int): Int { + delay(1) + second(i) + // EXPRESSION: i + // RESULT: 25: I + return 12 +} + +fun main() { + runBlocking { + for (i in 0 .. 100) { + launch { + first(i) + } + } + } +} + +// STEP_OUT: 5 + +// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.out b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.out new file mode 100644 index 000000000000..f50daff810c6 --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutSeveralSuspendFramesSeveralCoroutines.out @@ -0,0 +1,13 @@ +LineBreakpoint created at stepOutSeveralSuspendFramesSeveralCoroutines.kt:10 +Run Java +Connected to the target VM +stepOutSeveralSuspendFramesSeveralCoroutines.kt:10 +stepOutSeveralSuspendFramesSeveralCoroutines.kt:17 +stepOutSeveralSuspendFramesSeveralCoroutines.kt:23 +stepOutSeveralSuspendFramesSeveralCoroutines.kt:30 +stepOutSeveralSuspendFramesSeveralCoroutines.kt:38 +stepOutSeveralSuspendFramesSeveralCoroutines.kt:46 +Compile bytecode for i +Disconnected from the target VM + +Process finished with exit code 0 diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt new file mode 100644 index 000000000000..ffb9520f85f4 --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.kt @@ -0,0 +1,36 @@ +// 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 { + val x = funWithSuspendLast(i) + println("x = $x") + delay(1) + println("i = $i") + } + } + } +} + +suspend fun funWithSuspendLast(i: Int): Int { + if (i == 25) { + //Breakpoint! + someInt() + error("This exception should be thrown") + } else { + return 10 + } +} + +suspend fun someInt(): Int { + delay(1) + return 42 +} + +// STEP_OUT: 1 +// STEP_OVER: 3 + +// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.out b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.out new file mode 100644 index 000000000000..957daee85875 --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/stepOutWithException.out @@ -0,0 +1,26 @@ +LineBreakpoint created at stepOutWithException.kt:21 +Run Java +Connected to the target VM +stepOutWithException.kt:21 +Disconnected from the target VM + +Process finished with exit code 1 +Exception in thread "main" java.lang.IllegalStateException: This exception should be thrown + at StepOutWithExceptionKt.funWithSuspendLast(stepOutWithException.kt:22) + at StepOutWithExceptionKt$funWithSuspendLast$1.invokeSuspend(stepOutWithException.kt) + at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) + at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:235) + at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:168) + at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:474) + at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:508) + at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:497) + at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:595) + at kotlinx.coroutines.EventLoopImplBase$DelayedResumeTask.run(EventLoop.common.kt:493) + at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280) + at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85) + at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59) + at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) + at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38) + at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) + at StepOutWithExceptionKt.main(stepOutWithException.kt:6) + at StepOutWithExceptionKt.main(stepOutWithException.kt) diff --git a/plugins/kotlin/jvm-debugger/test/testData/stepping/stepOut/souSuspendFun.kt b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt similarity index 72% rename from plugins/kotlin/jvm-debugger/test/testData/stepping/stepOut/souSuspendFun.kt rename to plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt index a77ee68f95f7..97af6fdb472a 100644 --- a/plugins/kotlin/jvm-debugger/test/testData/stepping/stepOut/souSuspendFun.kt +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.kt @@ -1,8 +1,8 @@ -// ATTACH_LIBRARY: coroutines +// ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3)-javaagent package souSuspendFun -import forTests.builder +import kotlinx.coroutines.* private fun foo(): Int { //Breakpoint! @@ -26,10 +26,14 @@ suspend fun first(): Int { return 12 } -fun main(args: Array) { - builder { - first() // 6 +fun main() { + runBlocking { + launch { + first() + } } } // STEP_OUT: 5 + +// REGISTRY: debugger.filter.breakpoints.by.coroutine.id=true diff --git a/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.out b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.out new file mode 100644 index 000000000000..74b53e16f9a8 --- /dev/null +++ b/plugins/kotlin/jvm-debugger/test/testData/evaluation/singleBreakpoint/coroutines/stepOut/unsupported/stepOutTailCallOptimization.out @@ -0,0 +1,8 @@ +LineBreakpoint created at stepOutTailCallOptimization.kt:9 +Run Java +Connected to the target VM +stepOutTailCallOptimization.kt:9 +stepOutTailCallOptimization.kt:13 +Disconnected from the target VM + +Process finished with exit code 0 diff --git a/plugins/kotlin/jvm-debugger/test/testData/stepping/stepOut/souSuspendFun.out b/plugins/kotlin/jvm-debugger/test/testData/stepping/stepOut/souSuspendFun.out deleted file mode 100644 index 1c16602a9dbd..000000000000 --- a/plugins/kotlin/jvm-debugger/test/testData/stepping/stepOut/souSuspendFun.out +++ /dev/null @@ -1,12 +0,0 @@ -LineBreakpoint created at souSuspendFun.kt:9 -Run Java -Connected to the target VM -souSuspendFun.kt:9 -souSuspendFun.kt:13 -souSuspendFun.kt:17 -souSuspendFun.kt:21 -souSuspendFun.kt:25 -souSuspendFun.kt:31 -Disconnected from the target VM - -Process finished with exit code 0