使用jUnit在Eclipse中断开异常 [英] Break on Exception in Eclipse using jUnit
本文介绍了使用jUnit在Eclipse中断开异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在jUnit的调试模式下,有没有办法使Eclipse在未捕获的异常情况下发生突破?执行main()时Eclipse断了。是否有可以使用的命令行开关?
Is there a way to make Eclipse break on uncaught exceptions while in debug mode for jUnit? Eclipse breaks fine when executing main(). Is there a command-line switch I can use?
谢谢
推荐答案
p>如果在jUnit中调试单个方法,则断点开始工作。如果在jUnit中调试了整个类或包,调试器就不起作用。
If you debug a single method in jUnit, the breakpoints start to work. If an entire class or package is debugged in jUnit, the debugger doesn't work.
这篇关于使用jUnit在Eclipse中断开异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文