dumpCoroutines

fun dumpCoroutines(out: PrintStream = System.out)(source)

Dumps all active coroutines into the given output stream, providing a consistent snapshot of all existing coroutines at the moment of invocation. The output of this method is similar to jstack or a full thread dump. It can be used as the replacement to "Dump threads" action.

Example of the output:

Coroutines dump 2018/11/12 19:45:14

Coroutine "coroutine#42":StandaloneCoroutine{Active}@58fdd99, state: SUSPENDED
at MyClass$awaitData.invokeSuspend(MyClass.kt:37)
at _COROUTINE._CREATION._(CoroutineDebugging.kt)
at MyClass.createIoRequest(MyClass.kt:142)
at MyClass.fetchData(MyClass.kt:154)
at MyClass.showData(MyClass.kt:31)
...