diff --git a/tomcat-multiple-instances/templates/tomcat-default.j2 b/tomcat-multiple-instances/templates/tomcat-default.j2 index ef6a6dc1..31fce26c 100644 --- a/tomcat-multiple-instances/templates/tomcat-default.j2 +++ b/tomcat-multiple-instances/templates/tomcat-default.j2 @@ -46,7 +46,7 @@ JAVA_OPTS="${JAVA_OPTS} -XX:+DisableAttachMechanism -Dcom.sun.management.jmxremo {% endif %} {% if item.remote_debugging is defined and item.remote_debugging %} # You will be able to use a java debugger on port {{ item.remote_debugging_port }}. -JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address={{ item.remote_debugging_port }},server=y,suspend=n" +JAVA_OPTS="${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket, address={{ item.remote_debugging_port }}, server=y, suspend=n" {% endif %} # WARNING: This directory will be destroyed and recreated at every startup ! JVM_TMP={{ item.instance_path }}/tmp diff --git a/tomcat/templates/tomcat-default.j2 b/tomcat/templates/tomcat-default.j2 index 8d8862f1..0a4bdfa6 100644 --- a/tomcat/templates/tomcat-default.j2 +++ b/tomcat/templates/tomcat-default.j2 @@ -43,7 +43,9 @@ JAVA_OPTS="${JAVA_OPTS} -XX:+DisableAttachMechanism -Dcom.sun.management.jmxremo {% endif %} {% if tomcat_enable_remote_debugging %} # You will be able to use a java debugger on port {{ tomcat_remote_debugging_port }}. -JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address={{ tomcat_remote_debugging_port }},server=y,suspend=n" +JAVA_OPTS="${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket, address={{ tomcat_remote_debugging_port }}, server=y, suspend=n" +# Obsolete +#JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address={{ tomcat_remote_debugging_port }},server=y,suspend=n" {% endif %} # Location of the JVM temporary directory # WARNING: This directory will be destroyed and recreated at every startup !