From 9d176917e62767027352394a586b56062798fbe8 Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Mon, 4 Mar 2019 18:11:35 +0300 Subject: [PATCH] Fix EA-138393: Calculate async stack traces only on breakpoints --- .../idea/debugger/KotlinCoroutinesAsyncStackTraceProvider.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/KotlinCoroutinesAsyncStackTraceProvider.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/KotlinCoroutinesAsyncStackTraceProvider.kt index 19b9cb7f8f3..47fc8404ecd 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/KotlinCoroutinesAsyncStackTraceProvider.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/KotlinCoroutinesAsyncStackTraceProvider.kt @@ -64,7 +64,7 @@ class KotlinCoroutinesAsyncStackTraceProvider : KotlinCoroutinesAsyncStackTraceP fun getAsyncStackTrace(frameProxy: StackFrameProxyImpl, suspendContext: SuspendContextImpl): List? { val location = frameProxy.location() val method = location.safeMethod() ?: return null - val threadReference = frameProxy.threadProxy().threadReference.takeIf { it.isSuspended } ?: return null + val threadReference = frameProxy.threadProxy().threadReference.takeIf { it.isSuspended && it.isAtBreakpoint } ?: return null val invokePolicy = suspendContext.getInvokePolicy() val debugMetadataKtType = classByName(DEBUG_METADATA_KT, frameProxy, threadReference, invokePolicy) as? ClassType ?: return null