Skip to content

Commit 47f0a46

Browse files
authored
Fix the IDEA debugger (#3822)
The PR #3746 introduced a bug due to which the IDEA coroutine debugger didn't run. See https://youtrack.jetbrains.com/issue/KTIJ-26327
1 parent 387628b commit 47f0a46

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

kotlinx-coroutines-core/api/kotlinx-coroutines-core.api

+1-1
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ public final class kotlinx/coroutines/debug/internal/DebugProbesImpl {
944944
public final fun enhanceStackTraceWithThreadDump (Lkotlinx/coroutines/debug/internal/DebugCoroutineInfo;Ljava/util/List;)Ljava/util/List;
945945
public final fun enhanceStackTraceWithThreadDumpAsJson (Lkotlinx/coroutines/debug/internal/DebugCoroutineInfo;)Ljava/lang/String;
946946
public final fun getIgnoreCoroutinesWithEmptyContext ()Z
947-
public final fun isInstalled ()Z
947+
public final fun isInstalled$kotlinx_coroutines_debug ()Z
948948
public final fun setIgnoreCoroutinesWithEmptyContext (Z)V
949949
}
950950

kotlinx-coroutines-core/jvm/src/debug/internal/DebugProbesImpl.kt

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ internal object DebugProbesImpl {
3535
* This internal method is used by the IDEA debugger under the JVM name
3636
* "isInstalled$kotlinx_coroutines_debug" and must be kept binary-compatible, see KTIJ-24102
3737
*/
38-
val isInstalled: Boolean get() = installations.value > 0
38+
val isInstalled: Boolean
39+
// IDEA depended on "internal val isInstalled", thus the mangling. Public + JvmName in order to make this getter part of the ABI
40+
@JvmName("isInstalled\$kotlinx_coroutines_debug")
41+
get() = installations.value > 0
3942

4043
// To sort coroutines by creation order, used as a unique id
4144
private val sequenceNumber = atomic(0L)

0 commit comments

Comments
 (0)