erik jansson
erik jansson

Reputation: 1

How to degug a standalone Java program in Eclipse using Maven?

I am a beginner with Java, Maven, and Eclipse.

I have made a simple standalone Java program and generated a Maven package with Eclipse LUNA. When I began to debug the Java program, I found that breakpoints did not work. When setting the breakpoint, there will be a circle at the beginning of code line.

Now there was circle, but it had a line over the circle.

How can I execute debugging the Java program with Maven in Eclipse?

Upvotes: 0

Views: 215

Answers (2)

manocha_ak
manocha_ak

Reputation: 902

If you are really saying "line over circle" then you have breakpoints there in eclipse and disabled.

Go to "Debug" view > Breakpoints and enable you should stop at your breakpoints then in your debug session

Upvotes: 0

KKGanguly
KKGanguly

Reputation: 343

Do it like this:

a.Right click project.Then, Debug as -> Maven build ...

b.In the goals field put -Dmaven.surefire.debug test

c.In the parameters put a new parameter called forkMode with a value of never

Set your breakpoints down and run this configuration and it should hit the breakpoint.

Upvotes: 1

Related Questions