java -Xdebug -Xrunjdwp:transport=dt_socket,address=58242,suspend=n,server=y -Xmx1024m -jar .\cq5-author-p4502.jar -nofork
- Open Eclipse.
- Choose Run > Debug Configurations.
- Right-click Remote Java Applications and select New.
- Select your AEM/CQ5 project under Project.
- Type in the port, in our case
58242
- To start a debugging session, double-click your new configuration in the Debug Configurations screen after saving it.
You just need to install JSR45 plugin in your IntelliJ and do the following
- Add a JSR45 Compatible Server
- Select Application server as Generic
- Provide your host and port that you run in your browser in Remote Connection Settings
- Now the important part, select Startup/Connection tab
- Select Debug configuration
- Put the parameter
-agentlib:jdwp=transport=dt_socket,address=58242,suspend=n,server=y
in debug remote server JVM settings - Select transport Socket option
- Put the port
58242