Debug Java Code in AEM using Intellij

Start the AEM server using the following command: $ CQ_JVM_OPTS='-server -Xmx2048m -XX:MaxPermSize=2048M -Djava.awt.headless=true -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=30303' ./start Go to Run/Debug Configurations, Click + icon and Click Remote Make sure the port number…