Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Added "debug" target to start YaCy with enabled remote debugging

goligo01cea48678ca
diff --git a/build.xml b/build.xml
index a3143186a..cd06372ad 100644
--- a/build.xml
+++ b/build.xml
@@ -411,7 +411,7 @@
</target>
<!-- run YaCy (needed for NetBeans4) -->
-<target name="run" description="run YaCy">
+<target name="run" description="Run YaCy">
<!-- debug options:
java -Xrunhprof:help
Hprof usage: -Xrunhprof[:help]|[:<option>=<value>, ...]
@@ -468,8 +468,27 @@
</java>
</target>
-<!-- stop YaCy (needed for Eclipse) -->
-<target name="stop" description="stop YaCy">
+<!-- run YaCy with remote debugging enabled on port 8000 -->
+<target name="debug" description="Debug YaCy">
+ <java classname="yacy" fork="yes">
+ <classpath>
+ <pathelement location="${build}"/>
+ <pathelement location="${htroot}"/>
+ <pathelement location="${lib}/commons-collections.jar" />
+ <pathelement location="${lib}/commons-pool-1.2.jar" />
+ <pathelement location="${libx}" />
+ <fileset dir="${libx}" includes="**/*.jar" />
+ </classpath>
+ <arg line="-start"/>
+ <jvmarg line="-Xdebug"/>
+ <jvmarg line="-Xnoagent"/>
+ <jvmarg line="-Djava.compiler=none"/>
+ <jvmarg line="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/>
+ </java>
+</target>
+
+<!-- stop YaCy again -->
+<target name="stop" description="Stop YaCy">
<java classname="yacy" fork="yes">
<classpath>
<pathelement location="${build}"/>