[coroutine] Exception fixed for SUSPEND coroutines.

This commit is contained in:
Vladimir Ilmov
2020-01-20 20:20:58 +01:00
parent 99294cfdae
commit c33546f678
@@ -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)