From c33546f678142e8cb3c5e99e04a38c1629ab5297 Mon Sep 17 00:00:00 2001 From: Vladimir Ilmov Date: Mon, 20 Jan 2020 20:20:58 +0100 Subject: [PATCH] [coroutine] Exception fixed for SUSPEND coroutines. --- .../kotlin/idea/debugger/coroutine/command/CoroutineBuilder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/command/CoroutineBuilder.kt b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/command/CoroutineBuilder.kt index ef33dca4491..ad4944b8d26 100644 --- a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/command/CoroutineBuilder.kt +++ b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/command/CoroutineBuilder.kt @@ -74,7 +74,7 @@ class CoroutineBuilder(val suspendContext: XSuspendContext) { } else if ((coroutine.state == CoroutineInfoData.State.SUSPENDED || coroutine.activeThread == null) && coroutine.lastObservedFrameFieldRef is ObjectReference) { // to get frames from CoroutineInfo anyway // the thread is paused on breakpoint - it has at least one frame - val suspendedStackTrace = coroutine.stackTrace.take(creationFrameSeparatorIndex + 1) + val suspendedStackTrace = coroutine.stackTrace.take(creationFrameSeparatorIndex) for (suspendedFrame in suspendedStackTrace) { val suspendedXStackFrame = stackFrame(positionManager, firstSuspendedStackFrameProxyImpl, suspendedFrame)