Expand my Community achievements bar.

SOLVED

AEM debug mode, Remote java application in eclipse

Avatar

Level 4

Hello All,

I am trying to run AEM in debug mode. I am using the following command to run.

java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -XX:+HeapDumpOnOutOfMemoryError -XX:MaxPermSize=512M -Xmx1280m -Dorg.apache.sling.commons.log.level=INFO -jar AEM_6.0_Quickstart.jar -p 4502 -verbose -nofork 

In eclipse I am doing the following steps:

To start a remote debugging session from Eclipse, do the following:

  1. Open Eclipse.
  2. Choose Run > Debug Configurations.
  3. Right-click Remote Java Applications and select New.
  4. Select your CQ5 project under Project.
  5. Type in the port from the "address" configuration of the jvm parameter defined above. In the example, it is port 8000 (and the host name of the machine you are connecting to, most likely localhost)
  6. To start a debugging session, double-click your new configuration in the Debug Configurations screen after saving it.

When I do this and debug the project, I am getting the following error.

 

Failed to connect to remote VM. Connection refused.
Connection refused: connect

 

Can you please help me with this ?

1 Accepted Solution

Avatar

Correct answer by
Level 10
2 Replies

Avatar

Correct answer by
Level 10

Avatar

Level 10

What version of Eclipse are you using? 

https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html

Try this article - it was tested recently on AEM 6.