Enabling debug is the same as configuring any other JVM options and depends on which OS you're using. If you're running on Unix, you need to add the appropriate JVM options to the setenv.sh script. For example to enable debug on port 8000, add the following:
Code:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
On my Mac OS X box this gives me a setenv.sh that looks like the following:
Code:
JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home"
AGENT_PATHS=""
JAVA_AGENTS=""
JAVA_LIBRARY_PATH=""
JVM_OPTS="-Xmx512m -Xss192k -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
JAVA_OPTS="$JVM_OPTS $AGENT_PATHS $JAVA_AGENTS $JAVA_LIBRARY_PATH"
If you're running as a service on Windows, you'll need to add the options to the instance's wrapper.conf file. In this case the options need to be added as wrapper.java.additional properties. For example:
Code:
wrapper.java.additional.1="-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed"
wrapper.java.additional.2="-Dcatalina.base=%CATALINA_BASE%"
wrapper.java.additional.3="-Dcatalina.home=%CATALINA_HOME%"
wrapper.java.additional.4="-Djava.io.tmpdir=%CATALINA_BASE%\temp"
wrapper.java.additional.5="-Djava.util.logging.manager=com.springsource.tcserver.serviceability.logging.TcServerLogManager"
wrapper.java.additional.6="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
wrapper.java.additional.7="-Dwrapper.dump.port=-1"
wrapper.java.additional.8=-Xmx512m
wrapper.java.additional.9=-Xss192k
wrapper.java.additional.10=-Xdebug
wrapper.java.additional.11=-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n