I have a java class and I need to debug it (put breakpoints and continue using F6). I am using ANT script to init, build, deploy and run the code. I am using:
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,vars,source">
..........
</javac>
But when I place the breakpoint in a line in my foo.java class and I run the ant script (the run part, Right Click on run–>Debug As–>Ant Build), Eclipse does not stop at that line of code.
What am I missing out?!
In the
<java>ant task you should add two jvm parameters (<jvmarg>IIRC) to turn on debugging:This will launch the java program with debugging turned on and the program will be ready to accept debugger connections on port 5432. Then you should use your IDE’s remote debugging facility and direct it to connect to port 5432.