How to debug specific build variant of Android Gradle project in IntelliJ IDEA?
android, android-gradle-plugin, debugging, gradle, intellij-idea
Solution
There is `Build Variants` tool window under `View->Tool Windows` where you can choose build variant.
Also there is `Build Variants` docked view on the lower left side of IntelliJ IDEA window.
Problem
If I create `Android Application` debug configuration and will use it, then everything is ok and IntelliJ IDEA by default uses `debug` build type from build.gradle. But I want to debug specific build variant (flavor and build type). For example, flavor name is `Cabby` and build type if `mock`. I create debug configuration like this: Then I start debugging this configuration. Gradle tasks `assembleCabbyMock` and `installCabbyMock` are successfully executed and then I see this: