E B U G_ P R O P E R T Y_ N A M E
Name of the property that controls coroutine debugging.
In debug mode every coroutine is assigned a unique consecutive identifier. Every thread that executes a coroutine has its name modified to include the name and identifier of the currently running coroutine.
Enable debugging facilities with "
kotlinx.coroutines.debug" (DEBUG_PROPERTY_NAME) system property, use the following values:
auto" (default mode, DEBUG_PROPERTY_VALUE_AUTO) -- enabled when assertions are enabled with "
-ea" JVM option.
on" (DEBUG_PROPERTY_VALUE_ON) or empty string -- enabled.
off" (DEBUG_PROPERTY_VALUE_OFF) -- disabled.
Coroutine name can be explicitly assigned using CoroutineName context element. The string "coroutine" is used as a default name.
Debugging facilities are implemented by newCoroutineContext function that is used in all coroutine builders to create context of a new coroutine.