From 1128d659a4b808edbc9b32bf66d0c5c059dbb5e8 Mon Sep 17 00:00:00 2001 From: Vladimir Ilmov Date: Thu, 30 Apr 2020 13:13:52 +0200 Subject: [PATCH] (CoroutineDebugger) No restored frames in coroutine context found. --- .../idea/debugger/coroutine/proxy/ContinuationHolder.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/proxy/ContinuationHolder.kt b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/proxy/ContinuationHolder.kt index 2d71bd79876..7056e87de34 100644 --- a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/proxy/ContinuationHolder.kt +++ b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/proxy/ContinuationHolder.kt @@ -28,8 +28,8 @@ class ContinuationHolder private constructor(val context: DefaultExecutionContex if (coroutineStackFrame != null) consumer.add(coroutineStackFrame) } - val lastRestoredFrame = continuationStack.coroutineStack.last() - return findCoroutineInformation(lastRestoredFrame.baseContinuationImpl.coroutineOwner, consumer) + val lastRestoredFrame = continuationStack.coroutineStack.lastOrNull() + return findCoroutineInformation(lastRestoredFrame?.baseContinuationImpl?.coroutineOwner, consumer) } catch (e: Exception) { log.error("Error while looking for stack frame.", e) }