Start JEE AEM Forms in Debug mode for Eclipse | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Pulkit_Jain_

@gphillips58 

As per the blogs here[0][1], it depends on what you want to debug :

  • to debug the Host Controller (that means the server that manages the domain) use the domain.conf file or set the environment variable PROCESS_CONTROLLER_JAVA_OPTS

    PROCESS_CONTROLLER_JAVA_OPTS="$PROCESS_CONTROLLER_JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8788,server=y,suspend=n"

  • to debug a server instance of your domain you have to pass jvm args in your host.xml, for example to debug server-one. I assume this must be the case, so more details provided in the blogs.

 

[0] - https://developer.jboss.org/thread/230399

[1] - https://stackoverflow.com/questions/26927082/wildfly-domain-mode-debug 

1 reply

Pulkit_Jain_
Adobe Employee
Adobe Employee
January 4, 2022

@gphillips58 

Steps to enable debug for OSGi stack of the JEE instance should be the same as mentioned here- Debug an AEM app using eclipse (adobe.com)

For enabling remote debugging on a JEE set-up (assuming based on JBoss), edit your <jboss install location>/bin/standalone.conf. Now, look for [0] and uncomment it. It should be near the bottom. Similarly you can follow similar steps for other App servers, as applicable. 

Then you can configure the eclipse AEM server settings for that port, example - 8787. I assume this should suffice, please let us know your findings.

 

Hope this helps.

 

 

[0] - # JAVA_OPTS=”$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n”

 

Level 3
January 10, 2022

Yes, it is JBoss (on windows). We are running a cluster so I looked in the domain.conf.bat and found this:

rem # Sample JPDA settings for remote socket debugging
rem set "PROCESS_CONTROLLER_JAVA_OPTS=%PROCESS_CONTROLLER_JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,address=8788,server=y,suspend=n"
rem set "HOST_CONTROLLER_JAVA_OPTS=%HOST_CONTROLLER_JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"

 

Do we uncomment both lines or just one? If just one, which one?

 

Thanks

Pulkit_Jain_
Adobe Employee
Pulkit_Jain_Adobe EmployeeAccepted solution
Adobe Employee
January 11, 2022

@gphillips58 

As per the blogs here[0][1], it depends on what you want to debug :

  • to debug the Host Controller (that means the server that manages the domain) use the domain.conf file or set the environment variable PROCESS_CONTROLLER_JAVA_OPTS

    PROCESS_CONTROLLER_JAVA_OPTS="$PROCESS_CONTROLLER_JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8788,server=y,suspend=n"

  • to debug a server instance of your domain you have to pass jvm args in your host.xml, for example to debug server-one. I assume this must be the case, so more details provided in the blogs.

 

[0] - https://developer.jboss.org/thread/230399

[1] - https://stackoverflow.com/questions/26927082/wildfly-domain-mode-debug