How can I run wildfly in debug mode, as a service on Windows?

Uncomment following JAVA_OPTIONS from $JBOSS_HOME/bin/standalone.conf.bat

rem # Sample JPDA settings for remote socket debugging

set "JAVA_OPTS=%JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"

start service. Now you can detach a debugger with your favorite IDE. If you are using Eclipse you can switch to "Debug-Configurations" and add a new Remote Java-Application.


I'm using WildFly 11 and uncommenting the following lines in bin\standalone.conf.bat (windows) did the job:

set "DEBUG_MODE=true"
set "DEBUG_PORT=8787"