2

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?

user840930
  • 5,214
  • 21
  • 65
  • 94
  • how are you starting the junit test? – SomeDude Aug 15 '16 at 12:19
  • Is it possible to give more information? – erarat Aug 15 '16 at 12:30
  • The only idea: that is a basic thing that normally works. So ... even for experienced users; you might step back and check out the help center to read about "how do I ask stuff not working" questions. Because ... you shouldn't do it like this. Or do you assume that we are NSA and have a backdoor into your machine to tell you what you are doing wrong in your eclipse? – GhostCat Aug 15 '16 at 12:33
  • i do not know your problem's detail but it can solve your problem. http://stackoverflow.com/questions/1370868/eclipse-debugger-doesnt-stop-at-breakpoint/ – erarat Aug 15 '16 at 12:36
  • Using Jdk 1.8, eclipse Mars 1 release 4.5.1. Tried starting the Junit in different ways. Debug as-> Junit test and Run As->Junit test. Both times, the test completes, not stopping at the breakpoint(s). – user840930 Aug 15 '16 at 12:44
  • Are you sure it's actually executing the line where the breakpoint is set? – nitind Aug 15 '16 at 12:56

1 Answers1

3

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.

Community
  • 1
  • 1
user840930
  • 5,214
  • 21
  • 65
  • 94