Android Eclipse failing to debug

后端 未结 8 1754
北海茫月
北海茫月 2020-12-10 01:41

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.

8条回答
  •  攒了一身酷
    2020-12-10 02:12

    I know this is kind of late.... use it if @Sam's or @Killesk's answers do not work.

    1. ensure the manifest sets android:debuggable.

    2. 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.

提交回复
热议问题