Here is my ANT JUnit target
<target name="test" depends="compile" >
<junit failureProperty="test.failure" >
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432" />
<classpath>
<pathelement path="${basedir}\..\Core\lib\junit-4.10.jar"/>
<pathelement path="${basedir}\..\Suggestion\lib\ssce.jar"/>
<pathelement path="C:\Java\javamail-1.4.1\mail.jar"/>
<pathelement path="C:\Java\commons-net-2.0\commons-net-ftp-2.0.jar"/>
<pathelement path="${basedir}\WebContent\WEB-INF\lib\gson-2.2.1.jar"/>
<pathelement path="${tomcatLibs}\servlet-api.jar"/>
</classpath>
<classpath>
<pathelement path="${build}"/>
</classpath>
<formatter type="brief" usefile="false" />
<test name="com.server.junit.ServerTestSuite" />
<test name="com.junit.DictionaryTestSuite" />
<test name="com.util.junit.SuggestionTestSuite" />
</junit>
<fail message="Unit test failed" if="test.failure"/>
</target>
My unit tests pass fine if run through Eclipse but fail if I laund them from ANT. I want it to stop at my break point in a Unit test. From documentation I know I need to add these jvmarg but can't get it to stop so I obviously don't have them in the right place. Also, I don't think I have the port correct but what port should I use? I didn't have to set up any debug port when debugging JUnits through eclipse, it just worked