I am seeing debug statements in the console but the debugger does not stop on any breakpoints. I tried clearing all breakpoints and adding them back in. Not sure how this can
If you use Android studio, click debug app
instead of run app
:
Have you set the debuggable flag in the AndroidManifest? If you miss that, do so by adding android:debuggable="true" in the application tag. It should look like that in the end:
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
According to this answer, Inside build.gradle
for your app module, disable minifyEnable for your build variant and change it to false. Then, it should be:
minifyEnabled false
othewise you will see Line number not available in class xxxx
when you hover over breakpoint markers and they will be looked with a cross on them
In my case, click the "Attach debugger to Android process"
And it will shows a window said "Choose Process" Select the device you are using, and select the project that you want to debug. And it works.
Sometimes the debugger need to re-attach to the devices when you open the debugger at the first time.