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

Inquisitor Shm picture Inquisitor Shm · May 1, 2017 · Viewed 18.5k times · Source

I am running Wildfly as a service on windows. When I need to debug, I am shutting this down and starting Wildfly via standalone.bat -debug. What I want is to have the debug switch on always, when it runs as a service?

Answer

Varsha picture Varsha · May 2, 2017

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.