Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 660
Inquisitor Shm Avatar asked May 01 '17 20:05

Inquisitor Shm


People also ask

How do I enable debug logs in WildFly?

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)


2 Answers

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.

like image 107
Varsha Avatar answered Oct 02 '22 08:10

Varsha


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"
like image 32
Hamid Pourgholi Avatar answered Sep 29 '22 08:09

Hamid Pourgholi