Monday, August 8, 2016

Debug AEM with Eclipse

For debugging the AEM server with Eclipse we have to follow the following steps.

1.Start the AEM instance/server in debug mode.
2. Debug the configuration in Eclipse.


Start the AEM in debug mode:

Edit the start.bat file present inside crx-quickstart/bin folder and add the line
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=30303,suspend=n  after Djava.awt.headless=true
As shown in below image.






After changing the start.bat file save it and start the server by double clicking it.


Debug Configuration in Eclipse:

Open the Eclipse and go to the Run --> Debug Configuration and after that double click on the Remote Java Application give the Name choose the project on which we want to apply debugger and provide the host (localhost) and port (30303) as shown in below image.

















After providing all the details click on debug button.
Now just apply the breakpoint on the java file which you want to debug and enjoy the debugging.








No comments:

Post a Comment