Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use Netbeans to debug the code compiled using Ant's custom build.xml?
    primarykey
    data
    text
    <p>I have my own <code>build.xml</code> file consisting of few targets to compile and run my Java project with Ant. Here is the relevant part of this one:</p> <pre><code>&lt;path id="libpath"&gt; &lt;fileset dir="${lib.dir}" includes="**/*.jar" /&gt; &lt;/path&gt; &lt;patternset id="resources"&gt; &lt;include name="relative/path/to/resources/" /&gt; &lt;/patternset&gt; &lt;path id="resourcespath"&gt; &lt;fileset dir="${src.dir}"&gt; &lt;patternset refid="resources" /&gt; &lt;/fileset&gt; &lt;/path&gt; &lt;target name="compile"&gt; &lt;mkdir dir="${build.dir}" /&gt; &lt;mkdir dir="${classes.dir}" /&gt; &lt;javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="libpath" includeantruntime="false" debug="true" debuglevel="lines,vars,source" /&gt; &lt;copy todir="${classes.dir}"&gt; &lt;path refid="resourcespath" /&gt; &lt;/copy&gt; &lt;/target&gt; &lt;target name="debug" depends="compile"&gt; &lt;java fork="true" classname="${main-class}"&gt; &lt;sysproperty key="java.library.path" path="${dist.dir}"/&gt; &lt;classpath&gt; &lt;pathelement location="${classes.dir}" /&gt; &lt;path refid="libpath" /&gt; &lt;/classpath&gt; &lt;/java&gt; &lt;/target&gt; </code></pre> <p>All I want to do is to debug the compiled code in <code>${classes.dir}</code> using Netbeans by running the <code>debug</code> target of <code>build.xml</code>. At the moment, this target starts the compiled application without giving a chance to stop at breakpoints. I know that Netbeans generates default <code>build-impl.xml</code> file but this one is too large and is difficult to understand for me. That's why I want to know whether it's possible to use the Netbeans IDE to debug Java code compiled by Ant using my own <code>build.xml</code> file.</p> <p>There is also the similar question on <a href="https://stackoverflow.com/questions/2406825/how-to-debug-java-code-when-using-ant-script-in-eclipse">debugging Java code when using Ant script in Eclipse</a>, but as I can see the solution proposed is Eclipse specific.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload