When debugging regular code, it is very common to include the thread name and/or the thread ID in the log statements. For example, you might be familiar with a log output like the following:
13:09:30 [main] DEBUG c.s.a.d.SchemaFor - Classloader for schema generation is URLClassLoader
13:09:30 [main] DEBUG c.s.a.d.SchemaListener - Generating AVRO for class Universe
13:09:30 [main] DEBUG o.a.a.SchemaParseException - Cannot parse <null> schema
13:09:30 [pool-1-thread-1] INFO i.k.FlushWriter - 0
13:09:38 [btpool0-7] INFO c.s.a.SchemaFor - Implicit value error for UT8
13:09:40 [btpool0-7] INFO o.a.a.avro.DefaultValueEncoder - Default encoding using BOM
However, with coroutines, it is very common for a suspended function to run on a different thread after it has been resumed (naturally, if the coroutine dispatcher uses a thread pool, then a randomly selected thread...