Debugging a service

后端 未结 6 1355
攒了一身酷
攒了一身酷 2020-11-29 02:33

I have written a service with a remote interface and installed it on my PC\'s Eclipse AVD. I have a client test harness which starts and invokes methods in the service. Init

6条回答
  •  孤街浪徒
    2020-11-29 02:40

    just make sure you don't forget this line of code in your code and release your apk. if you try running your app without the debugger the line below will get stuck.

    android.os.Debug.waitForDebugger();
    

    also you can use the following to determine if the debugger is connected:

    android.os.Debug.isDebuggerConnected(); //Determine if a debugger is currently attached.
    

提交回复
热议问题