Skip to content

Commit

Permalink
Fix the IDEA debugger (#3822)
Browse files Browse the repository at this point in the history
The PR #3746 introduced a bug due to which the IDEA coroutine
debugger didn't run. See
https://youtrack.jetbrains.com/issue/KTIJ-26327
  • Loading branch information
dkhalanskyjb authored Jul 25, 2023
1 parent 387628b commit 47f0a46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kotlinx-coroutines-core/api/kotlinx-coroutines-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ public final class kotlinx/coroutines/debug/internal/DebugProbesImpl {
public final fun enhanceStackTraceWithThreadDump (Lkotlinx/coroutines/debug/internal/DebugCoroutineInfo;Ljava/util/List;)Ljava/util/List;
public final fun enhanceStackTraceWithThreadDumpAsJson (Lkotlinx/coroutines/debug/internal/DebugCoroutineInfo;)Ljava/lang/String;
public final fun getIgnoreCoroutinesWithEmptyContext ()Z
public final fun isInstalled ()Z
public final fun isInstalled$kotlinx_coroutines_debug ()Z
public final fun setIgnoreCoroutinesWithEmptyContext (Z)V
}

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

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

0 comments on commit 47f0a46

Please sign in to comment.