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!