Debugging coroutines and threads

Just read the coroutines guide and I can’t wait to try them out in an Android Project I’m currently working on. But one thing is holding me back a bit. I read in the section on debugging that you should run coroutines with the ´-Dkotlinx.coroutines.debug JVM option´. Is there some way to make this JVM option active in your IDE on a specific project, so that you wont have to type it into the terminal every time you want to debug something?

Btw. I’m using Android Studio.

In IntelliJ you can pass vm options under “run configurations” (see top-right near the green play button).

Hi. Could you post instructions or maybe a picture of where this is set?

I hope that these screenshots will guide you to the right place:

run-config

Thank you very much. Really appreciate the help.

Hm, but this doesn’t apply to Android projects. How would you enable debugging there?

1 Like

Sadly I never found a way to enable it in my Android project.

Having this option enabled in Android Studio would indeed be a nice feature. What’s the best place to add this feature request?

1 Like

Is there anything new regarding this? (On Android Studio)