Last active
December 14, 2019 14:24
-
-
Save vincentbrison/37b88537898d815eae46552a39b041e0 to your computer and use it in GitHub Desktop.
Enable kotlin coroutine debug mode on Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun setupCoroutineDebugMode() { | |
val debugProperty = if (BuildConfig.DEBUG) { | |
kotlinx.coroutines.DEBUG_PROPERTY_VALUE_ON | |
} else { | |
kotlinx.coroutines.DEBUG_PROPERTY_VALUE_OFF | |
} | |
System.setProperty(kotlinx.coroutines.DEBUG_PROPERTY_NAME, debugProperty) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment