How do debug CQ/AEM from Intellij 14.x
Set up a Web Facet in the Project
- Go to File -> Project Structure
- Select the “content” module (the folder contains components,templates)
- Click “+” above the list of modules and select “Web”
- As the Web Resource Directory, select the content/src/main/content/jcr_root subdirectory of your project as shown in the screen shot below.
Set up Debugger
- Goto Intellij -> Run -> Edit Configurations -> + (Add New Configuration) -> JSR 45 Compatible Server -> Remote
- Give the debugger a name CQ, remove any Before Launch steps (as we are not really building anything)
- Add Application server Generic, any start page say Geometrixx English and leave everything default
- Click on tab Startup/Connection, Debug. Change the port number or leave it default (in the below pic it was changed to 8000)
- Restart the CQ instance with the following parameters
java java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y -XX:MaxPermSize=512m -Xmx1024M -jar cq-author-4502.jar -nofork
- Click “Debug” icon to start the debugger from Intellij
Happy Coding! 😇
This post is licensed under CC BY 4.0 by the author.
Comments powered by Disqus.