title: How to debug cuke4duke using ant and attaching a remote debugger
body: <p>Following the cuke4duke ant tutorial at <a href="http://cuke4ninja.com/sec_ant.html" rel="nofollow">http://cuke4ninja.com/sec_ant.html</a>, it supplies the following to run the cuke4duke task:</p>
  
  <pre><code>&lt;taskdef name="cucumber" classname="cuke4duke.ant.CucumberTask" classpathref="compile.classpath"/&gt;
  &lt;cucumber args="--verbose --require target/test-classes --color --format pretty --format junit --out target/junit-report features" objectFactory="pico"&gt;
    &lt;classpath&gt;
      &lt;pathelement location="target/test-classes"/&gt;
    &lt;/classpath&gt;
  &lt;/cucumber&gt;
  </code></pre>
  
  <p>To debug, according to <a href="https://github.com/cucumber/cuke4duke/wiki/Debug-Cuke4Duke-Steps" rel="nofollow">https://github.com/cucumber/cuke4duke/wiki/Debug-Cuke4Duke-Steps</a> you just add the following jvm arguments:</p>
  
  <pre><code>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=4000
  </code></pre>
  
  <p>However, it doesn't actually specify how to do this in ant, and because this isn't a normal java ant task, I have no idea how these arguments are supposed to be added.  Does anyone else know?  Thanks.</p>