How does one debug coroutines just from the logs, ...
# coroutines
b
How does one debug coroutines just from the logs, I got an exception (TimeoutCancellationException) that appeared randomly but it never said where it was coming from so I had to dissect my program to finally find the ktor call that was responsible. Is there something that would allow to log where the exception really happened (without having a debugger attached all the time as it is not possible in production)?
m
This link could help you. https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-debug But I'm not sure whether you use coroutine in Android or not. It has some limitations in Android.
b
No it is on server side
1
m
Then you can use DebugProbes on the link.
👍 1
b
Yes thanks, I looked into that and that should do it.
🙏 1