Import the Maven Project
-
Open the Import dialog in IntelliJ IDEA by
- selecting Import Project on the welcome screen if you have no project open yet
- selecting File > Import Project from the main menu
-
In the Import dialog, select the POM file of your project.
-
Continue with the default settings as shown in the dialog below.
-
Continue through the following dialogs by clicking Next and Finish.
-
You are now set up for AEM Development using IntelliJ IDEA
Debugging JSPs with IntelliJ IDEA
The following steps are necessary for debugging JSPs with IntelliJ IDEA
- Set up a Web Facet in the Project
- Install the JSR45 support plugin
- Configure a Debug Profile
- Configure AEM for Debug Mode
Set up a Web Facet in the Project
IntelliJ IDEA must understand where to find the JSPs for debugging. Because IDEA cannot interpret the content-package-maven-plugin settings, it must be configured manually.
- Go to File > Project Structure
- Select the Content module
- Click + above the list of modules and select Web
- As the Web Resource Directory, select the
content/src/main/content/jcr_root subdirectoryof your project as shown in the screenshot below.
Install the JSR45 support plugin
- Go to the Plugins pane in the IntelliJ IDEA settings
- Navigate to the JSR45 Integration Plugin and select the check box next to it
- Click Apply
- Restart IntelliJ IDEA when requested to
Configure a Debug Profile
- Go to Run > Edit Configurations
- Hit the + and select JSR45 Remote
- In the configuration dialog, select Configure next to Application Server and configure a Generic server
- Set the start page to an appropriate URL if you want to open a browser when you start debugging
- Remove all Before launch tasks if you use vlt autosync, or configure appropriate Maven tasks if you do not
- On the Startup/Connection pane, adjust the port, if necessary
- Copy the command-line arguments that IntelliJ IDEA proposes
Configure AEM for Debug Mode
The last step required is to start AEM with the JVM options proposed by IntelliJ IDEA.
Start the AEM jar file directly and adding these options, for example, with the following command line:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=58242,suspend=n,server=y -Xmx1024m -jar cq-quickstart-6.5.0.jar
You can also add these options to your start script in crx-quickstart/bin/start as shown below.
Start Debugging
You are now all set up for debugging your JSPs in AEM.
- Select Run > Debug > Your Debug Profile
- Set breakpoints in your component code
- Access a page in your browser
Debugging Bundles with IntelliJ IDEA
Code in bundles can be debugged using a standard generic remote debug connection. You can follow the Jetbrain documentation on remote debugging.
Was this content helpful?
Announcements
Get hands-on with agentic AI.
Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.
Find an eventAdobe Experience Manager Roadmap Webinar, Part 1 (Sites & Assets) - Americas & EMEA
Preview the AEM Sites and Assets roadmap and agentic innovations. Ask the team live.
Adobe Experience Manager Roadmap Webinar, Part 1 (Sites & Assets) - Americas & APAC
Preview the AEM Sites and Assets roadmap and agentic innovations. Ask the team live.
Adobe Brand Visibility Roadmap Webinar - Americas & EMEA
Preview the Brand Visibility roadmap across Brand Concierge and AEM Sites. Ask live.