Debugging of my app is now suddenly broken. It has been fine up to now and I even reloaded a known good version of my entire code and it still fails to debug or even run.
I know this is kind of late.... use it if @Sam's or @Killesk's answers do not work.
ensure the manifest sets android:debuggable.
In onCreate
, add a call to Debug.waitForDebugger.
Adding the call to waitForDebugger
also works when reversing. For example you can add the following by hand in onCreate
and have smali/baksmali recompile it:
invoke-static {}, Landroid/os/Debug;->waitForDebugger()V
I don't have to use the tricks often, but when I do, waitForDebugger
always works. I don't recall a time I could not snap the debugger with it.
Strange solution...I just closed the project from package explorer, then removed it from the workspace. Closed Eclipse. Re-opened Eclipse and imported the project.
(Copy and pasted from Jesse's comment.)
I tried all of the above, but i turned out that it was not working due to multiple instances of eclipse.exe Killing them all in the task manager (CTRL+SHIFT+ESC) solved it.
Please see the correct annswer HERE
You have set a break point in one of the classes. Just take off all the break points in your project and run again, their will be no problem.
Eclipse->Window->Show View->(Other->Debug->)Breakpoints
I've had this happen due to my code being obfuscated. I didn't notice that someone had changed proguard.cfg for a production release and commented-out the "-dontobfuscate" line.
Occasionally Eclipse and the various Android development plug-ins will become out of sync. I usually attempt the following when debugging / development gets "funky"
Open a terminal on your platform and use the tool adb
in the "platform-tools" directory.
adb kill-server
adb start-server
Stash your working copy and revert your source code if using a repository.