diff --git a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/data/CoroutineAsyncStackFrameItem.kt b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/data/CoroutineAsyncStackFrameItem.kt index 1df111e6950..96bdb851e07 100644 --- a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/data/CoroutineAsyncStackFrameItem.kt +++ b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/data/CoroutineAsyncStackFrameItem.kt @@ -83,20 +83,6 @@ class DefaultCoroutineStackFrameItem(location: Location, spilledVariables: List< * - Kotlin/JavaStackFrame -> PreCoroutineStackFrameItem : CoroutinePreflightStackFrame.threadPreCoroutineFrames * */ -class PreCoroutineStackFrameItem internal constructor(val frame: StackFrameProxyImpl, location: Location, variables: List = emptyList()) : - CoroutineStackFrameItem(location, variables) { - constructor(frame: StackFrameProxyImpl, variables: List = emptyList()) : this(frame, frame.location(), variables) - - constructor(frame: StackFrameProxyImpl, restoredCoroutineStackFrameItem: CoroutineStackFrameItem) : this( - frame, - restoredCoroutineStackFrameItem.location, - restoredCoroutineStackFrameItem.spilledVariables - ) - - override fun createFrame(debugProcess: DebugProcessImpl): CapturedStackFrame { - return PreCoroutineStackFrame(frame, debugProcess, this) - } -} class RunningCoroutineStackFrameItem( val frame: StackFrameProxyImpl, diff --git a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/data/coroutineStackFrames.kt b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/data/coroutineStackFrames.kt index 3094c8a538e..977f5925b40 100644 --- a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/data/coroutineStackFrames.kt +++ b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/data/coroutineStackFrames.kt @@ -79,21 +79,6 @@ class CreationCoroutineStackFrame(debugProcess: DebugProcessImpl, item: StackFra true } -/** - * Acts as a joint frame, take variables from restored frame and information from the real 'exit' frame. - */ -class PreCoroutineStackFrame(val frame: StackFrameProxyImpl, val debugProcess: DebugProcessImpl, item: StackFrameItem) : - CoroutineStackFrame(debugProcess, item) { - override fun computeChildren(node: XCompositeNode) { - val fakeStackFrame = debugProcess.invokeInManagerThread { - val skipCoroutineFrame = SkipCoroutineStackFrameProxyImpl(frame) - debugProcess.positionManager.createStackFrame(skipCoroutineFrame, debugProcess, frame.location()) - } - fakeStackFrame?.computeChildren(node) -// super.computeChildren(node) - } -} - open class CoroutineStackFrame(debugProcess: DebugProcessImpl, val item: StackFrameItem, val realStackFrame: XStackFrame? = null) : StackFrameItem.CapturedStackFrame(debugProcess, item) { override fun customizePresentation(component: ColoredTextContainer) { diff --git a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/proxy/mirror/debugMetadata.kt b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/proxy/mirror/debugMetadata.kt index 59a641f3b38..5ad93c174bc 100644 --- a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/proxy/mirror/debugMetadata.kt +++ b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/proxy/mirror/debugMetadata.kt @@ -17,7 +17,7 @@ class DebugMetadata internal constructor(context: DefaultExecutionContext) : private val getStackTraceElementMethod = makeMethod("getStackTraceElement") private val getSpilledVariableFieldMappingMethod = makeMethod("getSpilledVariableFieldMapping", "(Lkotlin/coroutines/jvm/internal/BaseContinuationImpl;)[Ljava/lang/String;") - val baseContinuationImpl = BaseContinuationImpl(context, this); + val baseContinuationImpl = BaseContinuationImpl(context, this) override fun fetchMirror(value: ObjectReference, context: DefaultExecutionContext): MirrorOfDebugProbesImpl? { // @TODO fix this diff --git a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/util/CoroutineFrameBuilder.kt b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/util/CoroutineFrameBuilder.kt index 18e883cb29d..adb46ed2f20 100644 --- a/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/util/CoroutineFrameBuilder.kt +++ b/idea/jvm-debugger/jvm-debugger-coroutine/src/org/jetbrains/kotlin/idea/debugger/coroutine/util/CoroutineFrameBuilder.kt @@ -60,10 +60,7 @@ class CoroutineFrameBuilder { // rest of the stack stackFrames.addAll(preflightFrame.threadPreCoroutineFrames.drop(1).mapIndexedNotNull { index, stackFrameProxyImpl -> -// if (index == 0) -// PreCoroutineStackFrameItem(stackFrameProxyImpl, firstRestoredFrame) // get location and variables from restored part -// else - suspendContext.invokeInManagerThread { buildRealStackFrameItem(stackFrameProxyImpl) } + suspendContext.invokeInManagerThread { buildRealStackFrameItem(stackFrameProxyImpl) } }) return DoubleFrameList(stackFrames, preflightFrame.coroutineInfoData.creationStackTrace) @@ -81,7 +78,6 @@ class CoroutineFrameBuilder { return RunningCoroutineStackFrameItem(frame, location) } - /** * Used by CoroutineStackFrameInterceptor to check if that frame is 'exit' coroutine frame. */ diff --git a/idea/jvm-debugger/jvm-debugger-test/testData/xcoroutines/coroutineSuspendFun.kt b/idea/jvm-debugger/jvm-debugger-test/testData/xcoroutines/coroutineSuspendFun.kt index adb13ac1031..75ffc79a9e5 100644 --- a/idea/jvm-debugger/jvm-debugger-test/testData/xcoroutines/coroutineSuspendFun.kt +++ b/idea/jvm-debugger/jvm-debugger-test/testData/xcoroutines/coroutineSuspendFun.kt @@ -1,5 +1,4 @@ package continuation -// ATTACH_LIBRARY: coroutines // ATTACH_LIBRARY: maven(org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.3.4)-javaagent import kotlinx.coroutines.runBlocking