1 @file:Suppress("UNUSED")
2 
3 package kotlinx.coroutines.debug.internal
4 
5 import java.io.Serializable
6 import kotlin.coroutines.*
7 import kotlinx.coroutines.*
8 
9 /*
10  * This class represents all the data required by IDEA debugger.
11  * It is serializable in order to speedup JDWP interactions.
12  * **DO NOT MAKE BINARY-INCOMPATIBLE CHANGES TO THIS CLASS**.
13  */
14 @PublishedApi
15 internal class DebuggerInfo(source: DebugCoroutineInfoImpl, context: CoroutineContext) : Serializable {
16     public val coroutineId: Long? = context[CoroutineId]?.id
17     public val dispatcher: String? = context[ContinuationInterceptor]?.toString()
18     public val name: String? = context[CoroutineName]?.name
19     public val state: String = source.state
20     public val lastObservedThreadState: String? = source.lastObservedThread?.state?.toString()
21     public val lastObservedThreadName = source.lastObservedThread?.name
22     public val lastObservedStackTrace: List<StackTraceElement> = source.lastObservedStackTrace()
23     public val sequenceNumber: Long = source.sequenceNumber
24 }
25