(CoroutineDebugger) Alternative CoroutineInfoProvider added
Added way to retrieve coroutine information without an agent in target JVM. 'kotlin.debugger.coroutines.switch' provides two possibilities to test coroutines. Agent way gets activated once kotlinx.coroutines.debug.DebugProbes started with javaagent. Library-less ways use DispatchedContinuation or ChildContinuationImpl classes to retrieve coroutine information and stack traces.
This commit is contained in:
+2
-1
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.idea.debugger.test
|
||||
|
||||
import com.intellij.debugger.engine.AsyncStackTraceProvider
|
||||
import com.intellij.debugger.engine.JavaStackFrame
|
||||
import com.intellij.debugger.engine.JavaValue
|
||||
import com.intellij.debugger.memory.utils.StackFrameItem
|
||||
import com.intellij.execution.process.ProcessOutputTypes
|
||||
@@ -37,7 +38,7 @@ abstract class AbstractAsyncStackTraceTest : KotlinDescriptorTestCaseWithSteppin
|
||||
val frameProxy = this.frameProxy
|
||||
if (frameProxy != null) {
|
||||
try {
|
||||
val stackTrace = asyncStackTraceProvider.getAsyncStackTraceSafe(frameProxy, this)
|
||||
val stackTrace = asyncStackTraceProvider.lookupForResumeContinuation(frameProxy, this)
|
||||
if (stackTrace != null && stackTrace.isNotEmpty()) {
|
||||
print(renderAsyncStackTrace(stackTrace), ProcessOutputTypes.SYSTEM)
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ abstract class AbstractCoroutineDumpTest : KotlinDescriptorTestCaseWithStepping(
|
||||
|
||||
private fun stringDump(infoData: List<CoroutineInfoData>) = buildString {
|
||||
infoData.forEach {
|
||||
appendln("\"${it.name}\", state: ${it.state}")
|
||||
appendln("\"${it.key.name}\", state: ${it.key.state}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user