How do I use the Eclipse debugger in an AsyncTask when developing for Android?

前端 未结 2 833
名媛妹妹
名媛妹妹 2020-12-05 00:55

I\'m running ADT (Android Development Tools) in Eclipse and verified that my debugger is working by putting a breakpoint in MainMenu.oncreate (class Activity).

2条回答
  •  死守一世寂寞
    2020-12-05 01:17

    Put the following code fragment in the beginning of doInBackground:

    android.os.Debug.waitForDebugger();

    Then when you set a breakpoint in that thread, eclipse will find it.

提交回复
热议问题