android debugger does not stop at breakpoints
Solution 1:
Solution that worked for me:
- Simply uninstall the app from the device (manually on the device) and try debugging again(!)
Solution 2:
If you use Android studio, click debug app
instead of run app
:
Solution 3:
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
Solution 4:
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">
Solution 5:
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.