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?
To enable debug logging, run the following command: /subsystem=logging/root-logger=ROOT:change-root-log-level(level=DEBUG) To disable debug logging, run the following command: /subsystem=logging/root-logger=ROOT:change-root-log-level(level=INFO)
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With