score:19
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">
score:-1
I had the same issue and resolved it by increasing the debugger timeout values. The emulator is slow as a dog on my Dev box and that is what prevented the debugger to catch and stop on breakpoints. I changed the timeout values respectively from 3000 to 10000 and 20000 to 60000 and all is fine now.
V.
score:0
In my case, the app created a service with a different process with android:process=":service"
in the AndroidManifest. So I was setting breakpoints in the service process code while the debugger is automatically attached to the main app process. Pretty stupid of me but it might help someone else.
You attach to the service process with Run > Attach Debugger To Android Process
and choose the service process. You might need to add android.os.Debug.waitForDebugger();
to your service process code if you can't attach in time manually.
As far as I know, there's no way to automatically tell Android Studio or IntelliJ to attach to a different process before running.
score:0
i had this problem i clean buildTypes part of build.gradle and try age so it work me.
score:0
If you are finding this issue while using the Flutter plugin, you can try updating the plugin to version >65.1.3 as specified in this article
score:0
Pay attention to where you put your breakpoints, are you confident the line is reached by the compiler?
score:1
if you have added some build type
in build.gradle
check to have debuggable true
buildTypes {
debug {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
score:3
I had the same problem. Go to build.gradle. You must change this code if you have one.
buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' }
debug { debuggable true minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro' } }
The debug section should look like this:
buildTypes { release { minifyEnabled false shrinkResources false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' }
debug { debuggable true minifyEnabled false shrinkResources false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro' } }
I hope your problem is solved
score:5
Did you do "Debug As --> Android Application" instead of "Run As"?
Only if you do "Debug As", eclipse will stop at breakpoints.
score:9
For Android Studio:
- Check if the option
Mute Breakpoints
is enabled by mistake. The icon looks like this:
For Eclipse:
- Check if the option "Skip All Breakpoints" is enabled by mistake. It is the last icon on the following toolbar
score:14
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.
score:26
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
score:52
If you use Android studio, click debug app
instead of run app
:
score:63
Solution that worked for me:
- Simply uninstall the app from the device (manually on the device) and try debugging again(!)
Source: stackoverflow.com
Related Query
- android debugger does not stop at breakpoints
- Debugger does not stop at breakpoints in Eclipse when debugging on an existing android project
- Why does the Perl debugger not stop at breakpoints with do, but stops with require?
- Eclipse with php7.0 does not stop at breakpoints after ubuntu 16 upgrade
- Eclipse GGTS Debugger will not stop on breakpoints for Groovy code
- Eclipse debugger does not stop in anonymous class?
- Why Eclipse Debugger does not stop on scoped exception breakpoint (how to stop on handled exception)
- Debugger not stopping at breakpoints for developing android application using eclipse
- Android Packaging Problem: resources.ap_ does not exist
- Android adb (OSX Lion) does not recognize Galaxy Nexus, Jelly Bean
- PHP Debugger will not stop at breakpoints: Eclipse & Xdebug
- android maven plugin does not get ANDROID_HOME env variable in Eclipse
- Eclipse: "Run as" does not display the list elements (such as "Run as android application")
- Debugging Android NDK C/C++ code in Eclipse - breakpoints are not hit
- Android How to create Intent Filter for custom file extension that does NOT make it part of a chooser for everything on the phone
- Eclipse debugger does not recognize new java code
- xdebug breakpoints work but step over does not
- Android WebView: only loads HTML, does not load JS or CSS (in some devices)
- assert(false) does not stop execution
- Why does the Eclipse debugger give the error "Source not found" seemingly without reason?
- The Jar of this class file blongs to container Android 2.0.1 which does not allow modifications
- Android 4.0.4 does not show up in my Android SDK Manager
- EclipseFP debugger doesnot stop on breakpoints
- IntelliJ debugger not hitting breakpoints in a Maven Java Google App Engine project (Eclipse works)
- My android emulator in eclipse, does not start
- Android device does not show up in Android Device Chooser, but is listed in adb
- Error while excuting Android Project "Activity class does not exist."
- In dynamic web application project the Eclipse debugger is not hitting breakpoints
- Eclipse: New Android Test Project does not open the android test wizard
- Eclipse debugger not working ( Skip breakpoints disabled )
More Query from same tag
- Eclipse CDT syntax error on class declaration
- JBoss EAP 6.3 error :Could not create the Java virtual machine
- How to add fragment successfully?
- How to auto implement suggestions in Android Studio?
- Stop an Android app that Eclipse says is running (even though it isn't)?
- Eclipse remove version from project name
- How to get Eclipse show class hierarchy across multiple PHP projects?
- Android wifi p2p unsupported (wifidirect)
- How download jar file with pom file in gradle folder?
- Save data in form after wrong submit (JSP/Java)
- Can m2e install an external jar file? Or do I need to install the maven command line tool?
- Crash on ActivityThread.handleBindApplication when updating AndroidManifest.xml, rollback still crash
- Basic thenReturn not working in Mockito in Eclipse
- Eclipse not recognizing the android device
- How to add source of 'Android Private Libraries' to ADT eclipse?
- More eclipse insanity. Changing layout file turns TextViews into LinearLayouts
- Eclipse Maven Find Dependency from Class
- How we can provide the font style to text in ListView
- Unable to execute maven module java class
- Eclipse Java config missing path? Cannot resolve BitMask
- Android studio error in java main activity?
- Referenced file contains errors (http://java.sun.com/xml/ns/javaee/web-app.xsd)
- How to use DataCollection and Configuration in Kaa sample applications?
- Unexpected HTML/JSP warnings in Eclipse IDE
- Blackberry Package Project for Multiple OS Targets/Versions
- Is it possible to save multiple radiogroup using one shared preference method
- SWTBot Restart rcp application in test
- Import maven project to Eclipse 3.5 on Ubuntu > pom.xml is disabled
- RegisterActivity: cannot be resolved to a type, AppEngine
- Eclipse Mantis Error