调试Junit时,Eclipse中没有遇到断点

时间:2021-02-28 23:00:38

My breakpoints aren't being hit when I try to debug a Junit test in Eclipse. Is there some trick I am missing? Does anyone have any ideas?

当我尝试在Eclipse中调试Junit测试时,我的断点没有受到影响。我缺少一些技巧吗?有没有人有任何想法?

1 个解决方案

#1


1  

Okay it is resolved. The Junit test was being injected into a jboss server running in the Eclipse IDE. The Junit test is injected into the jboss server through the use of Arquillian. The reason the Junit test was skipping the breakpoints was because the jboss server also had to be started in debug mode. I restarted jboss in debug mode and ran the junit test again. This time, the break points are hit.

好的,它已经解决了。 Junit测试被注入到Eclipse IDE中运行的jboss服务器中。通过使用Arquillian将Junit测试注入jboss服务器。 Junit测试跳过断点的原因是因为jboss服务器也必须在调试模式下启动。我在调试模式下重启了jboss并再次运行了junit测试。这一次,破发点被击中。

#1


1  

Okay it is resolved. The Junit test was being injected into a jboss server running in the Eclipse IDE. The Junit test is injected into the jboss server through the use of Arquillian. The reason the Junit test was skipping the breakpoints was because the jboss server also had to be started in debug mode. I restarted jboss in debug mode and ran the junit test again. This time, the break points are hit.

好的,它已经解决了。 Junit测试被注入到Eclipse IDE中运行的jboss服务器中。通过使用Arquillian将Junit测试注入jboss服务器。 Junit测试跳过断点的原因是因为jboss服务器也必须在调试模式下启动。我在调试模式下重启了jboss并再次运行了junit测试。这一次,破发点被击中。