Skip to content

Commit

Permalink
Modife NB debug/profile targets to prompt for command-line args.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Aug 6, 2009
1 parent 6ecd924 commit a72230e
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions netbeans-ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@

<target name="profile-gem-install-rake" depends="jar" description="Profile a local gem installation of Rake">
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>

<nbprofiledirect>
<classpath> <pathelement location="... specify ..."/> </classpath>
<classpath>
<pathelement path="${jruby.classes.dir}"/>
<path refid="build.classpath"/>
</classpath>
</nbprofiledirect>

<java classname="org.jruby.Main" maxmemory="${jruby.launch.memory}" fork="true">
Expand All @@ -29,9 +32,12 @@

<target name="profile-rails-server" depends="jar" description="Profile the Rails server">
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>

<nbprofiledirect>
<classpath> <pathelement location="... specify ..."/> </classpath>
<classpath>
<pathelement path="${jruby.classes.dir}"/>
<path refid="build.classpath"/>
</classpath>
</nbprofiledirect>

<java classname="org.jruby.Main" maxmemory="${jruby.launch.memory}" fork="true">
Expand All @@ -55,6 +61,8 @@

<target name="profile-nb" depends="compile" description="Profile Project">
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>

<input message="Enter flags and args for `jruby` command:" addproperty="jruby.args"/>

<nbprofiledirect>
<classpath>
Expand All @@ -74,20 +82,23 @@
<jvmarg value="-Djruby.lib=${lib.dir}"/>
<jvmarg value="-Djruby.shell=/bin/sh"/>
<jvmarg value="-Djruby.script=jruby"/>
<!-- uncomment below and point to your ruby script -->
<!-- <arg value="/path/to/your/ruby/script.rb"/> -->
<arg line="${jruby.args}"/>
</java>
</target>

<target name="debug-nb" depends="jar" description="Task for debugging JRuby within NetBeans">
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>

<input message="Enter flags and args for `jruby` command:" addproperty="jruby.args"/>

<nbjpdastart addressproperty="jpda.address" name="JRuby" transport="dt_socket">
<classpath>
<pathelement path="${jruby.classes.dir}"/>
<path refid="build.classpath"/>
</classpath>
<sourcepath path="${src.dir}"/>
</nbjpdastart>

<java classname="org.jruby.Main" maxmemory="${jruby.launch.memory}" fork="true">
<classpath>
<pathelement path="${jruby.classes.dir}"/>
Expand All @@ -102,8 +113,7 @@
<jvmarg value="-Djruby.lib=${lib.dir}"/>
<jvmarg value="-Djruby.shell=/bin/sh"/>
<jvmarg value="-Djruby.script=jruby"/>
<!-- uncomment below and point to your ruby script -->
<!-- <arg value="/path/to/your/ruby/script.rb"/> -->
<arg line="${jruby.args}"/>
</java>
</target>
</project>

0 comments on commit a72230e

Please sign in to comment.