Nul*_*ter 6 debugging android kotlinx.coroutines
是否有可能在Android中调试协同程序?当我尝试调试此代码段时:
runBlocking {
try {
async(CommonPool) {
showLoadingIndicator()
val a = loadData().await()
hideLoadingIndicator()
}
} catch (e: Exception) {
Log.e("lala", "exception " + e.toString())
}
}
Run Code Online (Sandbox Code Playgroud)
val a有以下消息: Cannot find local variable: name = a
在我的应用程序中,我正在设置coroutines调试的属性,如下所示:
System.setProperty("kotlinx.coroutines.debug", if (BuildConfig.DEBUG) "on" else "off")
Run Code Online (Sandbox Code Playgroud)
还是行不通.现在我不知道在使用协同程序时如何使用调试器.愿你们帮帮我吧?
提前致谢
阿尔班
| 归档时间: |
|
| 查看次数: |
1424 次 |
| 最近记录: |