有没有什么办法可以断点测试类里面? [英] Is there any way to breakpoint inside the tested classes?

查看:205
本文介绍了有没有什么办法可以断点测试类里面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我的情况:

  1. 在我有一个Android服务( CoreService
  2. 我用 ServiceTestCase< CoreService> 来测试它
  3. CoreService 产生一个线程和实例化几类具有监听器/回调在他们身上。
  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.

有什么办法来设立在催生线程和/或回调的断点,并有JUnit的停止这些?它只是停在了JUnit项目中设置断点或 CoreService 类。

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.

推荐答案

试着改变断点暂停政策的暂停虚拟机

Try changing the breakpoint suspend policy to Suspend VM:

要在全球进行更改:

有关详细信息断点挂起政策,请<一href="http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/breakpoints/ref-suspendpolicy_option.htm"相对=nofollow>这里。

这篇关于有没有什么办法可以断点测试类里面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆