A有一个像下面的Kotlin频道。当我在Log行放置断点时,我希望能够在Android Studio中看到测试变量,但我不能。
val channel = Channel<Int>()
launch {
val test = channel.receive()
Log.d(test.toString()) <--- Breakpoint set here
}
launch {
channel.send(1)
}
当我在断点处停止时,会在Android Studio调试器中显示。
this = {Test$test$8@7232}
$channel = {RendezvousChannel@7435}
p$ = {StandaloneCoroutine@7478}
_context = {CombinedContext@7483}
_facade = {DispatchedContinuation@7484}
completion = {StandaloneCoroutine@7478}
label = 1
arity = 2
shadow$_klass_ = {Class@7194} ""
shadow$_monitor_ = -1282289382