Is there any way to breakpoint inside the tested c

2020-03-03 06:55发布

Here's my scenario:

  1. I have an Android service (CoreService)
  2. I use ServiceTestCase<CoreService> to test it
  3. CoreService spawns a thread and instantiates several classes that have listeners/callbacks on them.

Is there any way to set up breakpoints in the spawned threads and/or callbacks and have JUnit stop at these? It only stops at breakpoints set in the JUnit project or CoreService class.

1条回答
Luminary・发光体
2楼-- · 2020-03-03 07:40

Try changing the breakpoint suspend policy to Suspend VM:

enter image description here

To change it globally:

enter image description here

For more information about Breakpoint Suspend Policy, check out here.

查看更多
登录 后发表回答