Is there an IDE feature to see a trace of which me...
# coroutines
r
Is there an IDE feature to see a trace of which methods are getting invoked from which threads? I have a crash happening in production occasionally where google maps functions are getting invoked off the main thread and I’m having a heck of a time trying to trace the call stack back to the originating
launch
l
Do you ever use
GlobalScope
, or a scope that doesn't have an explicitly defined dispatcher? Or a dispatcher that is not
Dispatchers.Main
? Looking for that should help.
r
I do use
GlobalScope
for a couple of things at my repository layer
I was just hoping that maybe a static analysis tool existed that could figure out which scopes a given function was being invoked from
l
It uses
Dispatchers.Default
by default (hence the name). Cmd+shift+F (Search in Path) and cmd + click (go to declaration or find usages) are my favorite "static analysis tools". I'm not aware of something coroutines specific. You can still put CoroutineName into the scope's context, and log it just before the crashing code.
2