Is it possible to enter debug mode for android when running junit test?

前端 未结 3 984
长情又很酷
长情又很酷 2021-02-19 10:39

Usually i run a junit test using adb shell am instrument -w com.android.contacts.tests/android.test.InstrumentationTestRunner. And it actually works, it will run al

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-19 11:20

    I found the answer just now. It will block when i start instrument since it is waiting for me to set a breakpoint. So After i make a breakpoint, then the junit start to run. So the sequence of debug a android junit project is :

    1. start instrument with debug set true.
    2. make a break point using command line or eclipse.
    3. the instrument will start to run automatically.

提交回复
热议问题