I am trying to debug over network in Android Studio. I connected via port 5555 and generally it is possible step through break points. But it often takes minutes just to exe
I tried setting testCoverageEnabled to false but that did not work for me. In my case, I had ProGuard enabled for my debug flavor and disabling it (i.e. setting minifiyEnabled to false) was the only thing that allowed me to be able to see my local variables while debugging again.
Had the same problem.
There is a bug in Android Studio, see https://code.google.com/p/android/issues/detail?id=93730
They recommend removing in build.gradle (app), this fixed the issue for me.
android {
buildTypes {
debug {
...
testCoverageEnabled true
}
}
}
I had same trouble. I completely reinstalled my IDE and the trouble has been disappeared. I hope my approach will help you.
In my case, it was because I had forgotten that my build variant was set to release
. Toggling the variant back to debug
and re-running correctly showed the local variables.
After a while of figuring out this same issue, I realized I was running a release build rather than a debug build.
The build variants window may not be open in Android Studio by default. Go to Tool Windows -> Build Variants. In the Build Variants window, select the appropriate build.
In your app.gradle file, make sure debuggable is set to true in the build variant you would like to debug:
android {
// ...
buildTypes {
release {
// ...
}
debug {
debuggable true
}
}
// ...
}
If you would like to debug your release build, go ahead and add debuggable true
to your release build.
Hope this helps!
I tried some kind of hit n trial and made it work with the settings as seen in the attachment. FYI, using latest version of Android Studio 3.3.1 and gradle version 4.6.