Monday, February 25, 2019

Debug in AEM IntelliJ


Debug Java Code in AEM using IntelliJ

1) First start AEM in debug mode use below command for the same

java -jar aem-author-4502.jar -fork -forkargs -- -Xdebug -Xrunjdwp:transport=dt_socket,address=59865,suspend=n,server=y -Xmx1520m -XX:MaxPermSize=512m -XX:-UseSplitVerifier

2) Make sure the debug port number 59865 is free

3) Go to IntelliJ, Run Configurations, Remote and click on + icon

4) In the settings, mention the same port which is used while starting the AEM in debug mode


5) Select the debug configuration and click on debug icon , it should show below message

Connected to the target VM, address: 'localhost:59865', transport: 'socket'

6) Set debug points and make a request from Front End, and enjoy debugging !!

2 comments: