(CoroutineDebugger) fix for debugger agent for 1.3.6 version and up
This commit is contained in:
+11
-15
@@ -46,22 +46,18 @@ class DebuggerConnection(
|
|||||||
val kotlinxCoroutinesCore = params.classPath?.pathList?.firstOrNull { it.contains("kotlinx-coroutines-core") }
|
val kotlinxCoroutinesCore = params.classPath?.pathList?.firstOrNull { it.contains("kotlinx-coroutines-core") }
|
||||||
val kotlinxCoroutinesDebug = params.classPath?.pathList?.firstOrNull { it.contains("kotlinx-coroutines-debug") }
|
val kotlinxCoroutinesDebug = params.classPath?.pathList?.firstOrNull { it.contains("kotlinx-coroutines-debug") }
|
||||||
|
|
||||||
val mode = when {
|
if (kotlinxCoroutinesCore != null) {
|
||||||
kotlinxCoroutinesCore != null -> {
|
val coreVersion = determineCoreVersionMode(kotlinxCoroutinesCore)
|
||||||
val coreVersion = determineCoreVersionMode(kotlinxCoroutinesCore)
|
val mode = if (coreVersion == CoroutineDebuggerMode.DISABLED && kotlinxCoroutinesDebug != null)
|
||||||
if (coreVersion == CoroutineDebuggerMode.DISABLED && kotlinxCoroutinesDebug != null)
|
CoroutineDebuggerMode.VERSION_UP_TO_1_3_5
|
||||||
CoroutineDebuggerMode.VERSION_UP_TO_1_3_5
|
else
|
||||||
else
|
coreVersion
|
||||||
CoroutineDebuggerMode.DISABLED
|
|
||||||
}
|
|
||||||
kotlinxCoroutinesDebug != null -> CoroutineDebuggerMode.VERSION_UP_TO_1_3_5
|
|
||||||
else -> CoroutineDebuggerMode.DISABLED
|
|
||||||
}
|
|
||||||
|
|
||||||
when (mode) {
|
when (mode) {
|
||||||
CoroutineDebuggerMode.VERSION_1_3_6_AND_UP -> initializeCoroutineAgent(params, kotlinxCoroutinesCore)
|
CoroutineDebuggerMode.VERSION_1_3_6_AND_UP -> initializeCoroutineAgent(params, kotlinxCoroutinesCore)
|
||||||
CoroutineDebuggerMode.VERSION_UP_TO_1_3_5 -> initializeCoroutineAgent(params, kotlinxCoroutinesDebug)
|
CoroutineDebuggerMode.VERSION_UP_TO_1_3_5 -> initializeCoroutineAgent(params, kotlinxCoroutinesDebug)
|
||||||
else -> log.debug("CoroutineDebugger disabled.")
|
else -> log.debug("CoroutineDebugger disabled.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
connect()
|
connect()
|
||||||
|
|||||||
Reference in New Issue
Block a user