Expand my Community achievements bar.

SOLVED

Start JEE AEM Forms in Debug mode for Eclipse

Avatar

Level 3

How do I start AEM Forms on JEE in Debug mode for Eclipse? I have found this AEM Developer Tools for Eclipse | Adobe Experience Manager and this Debug an AEM app using eclipse (adobe.com) but nothing I have found tells where to put the JVM parameter on a JEE instance.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@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 

View solution in original post

3 Replies

Avatar

Employee Advisor

@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”

 

Avatar

Level 3

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

Avatar

Correct answer by
Employee Advisor

@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