我试图麻烦拍摄JUnit.在源代码中,我在两个地方设置了断点:1)在一行中初始化静态成员2)其中一个测试用例的第一行.
调试器在静态字段初始化行中停止.但它并没有停留在测试用例中.无论我在测试用例中设置断点,调试器都不会停在那里.我确信测试用例已经执行,因为我可以看到我添加的日志消息出现在日志中.
任何帮助将不胜感激.
我正在使用Eclipse Galileo和JUnit4启动器.
Eclipse Debugger突然停止不抛出任何东西:
private void openChannelsListActivity() {
try{
Intent gridListIntent=new Intent();
// the pause is on the following line
gridListIntent.setClass(this,ChannelsListActivity.class);
startActivity(gridListIntent);
}
catch (Throwable e){
ErrorMessage.outputMessageByName(
"channels_list_activity_create",this, " While setting intent.");
finish();
}
}
Run Code Online (Sandbox Code Playgroud)
堆栈是:
DexFile.defineClass(String, ClassLoader, int, ProtectionDomain) line: not available [native method]
DexFile.loadClassBinaryName(String, ClassLoader) line: 207
PathClassLoader.findClass(String) line: 200
PathClassLoader(ClassLoader).loadClass(String, boolean) line: 551
PathClassLoader(ClassLoader).loadClass(String) line: 511
PackVideo.openChannelsListActivity() line: 508
Run Code Online (Sandbox Code Playgroud)
如果我按下Resume,应用程序将继续运行而不会出现任何问题.活动开始正常,但这不是正常行为,肯定意味着出错了.它是什么?
问题不在于等待; 从启动应用程序到此时的时间约为2秒.
这不是一个未被捕获的例外; 我在调试器首选项中将其关闭.
它不是一个隐藏的断点,我已将它们清理干净了.