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