0

I added the following line to the run.sh file which activates remote debugging:

set JAVA_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%

However, it causes the server to not be restarted! I don't even get an exception, because the server.log file isn't updated at all!

user940016
  • 2,878
  • 7
  • 35
  • 56
  • 1
    Try using `suspend=n`. See also http://stackoverflow.com/questions/11568756/how-do-i-debug-a-war-file-on-a-remote-machine?lq=1. – Vadzim Sep 20 '12 at 13:43
  • But http://stackoverflow.com/questions/3534384/how-to-enable-remote-debugging-in-jboss-5 suggests the opposite... – user940016 Sep 20 '12 at 14:16
  • @Vadzim is right `suspend=y` makes the VM wait until you connect a debugger `suspend=n` starts normally. – Philippe Marschall Sep 20 '12 at 17:06

1 Answers1

3

You are using Windows syntax in shell script for *nix OS. You need to add something like this to run.sh:

JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
export JAVA_OPTS
helios
  • 2,603
  • 4
  • 21
  • 26