Namastey,
There are situations when you want to do debugging of OSGI java code while it is running on your AEM.
There are two parts to it :
java -Xmx2g -agentlib:jdwp=transport=dt_socket,address=5402,server=y,suspend=n -jar cq-author-p4502.jar
Dhanywad
There are situations when you want to do debugging of OSGI java code while it is running on your AEM.
There are two parts to it :
- AEM server should be enabled to accept remote debugging connection
- Eclipse IDE / Intellij should be configured to make remote debugging connection to AEM
Start AEM JAR with following command
java -Xmx2g -agentlib:jdwp=transport=dt_socket,address=5402,server=y,suspend=n -jar cq-author-p4502.jar
-Xrunjdwp loads the JPDA reference implementation of JDWP
- transport-dt_socket is the name of the transport to use in connecting to debugger
- server=y > means listen for a debugger application to attach
- address=5402 > means listen for a connection at this address (no host = this port on add interfaces)
- suspend=n > means do not wait for a debugger to attach
Add Debug Configuration in Eclipse
- click on debug configuration
- Select Remote Java Application
- Add Configuration
- In the new configuration, select project and provide aem host and aem port
Now setup some break points in java code ( except JSP)
Run your program and eclipse should ask you to enter debug mode.
Dhanywad
Simple and straight forward! ^_^
ReplyDeleteThank you so much for sharing this worth able content with us.
ReplyDeleteTIBCO Businessworks6x Online Training
You don't need all these attributes, you can use the 'debug' flag instead. You can simply use "java -jar cq-author-p4502.jar -debug 5402"
ReplyDeleteThank you for sharing this! What you have shared is very helpful and informative. Would love to see more updates from you.
ReplyDeleteMelbourne Web Designer
The blog you have shared here is quite informative, interesting and helpful.Thanks for sharing the useful information here
ReplyDeleteTIBCO BW 6 Training
TIBCO BW Training institutes in Hyderabad
TIBCO BusinessWorks 6.x Training
TIBCO Business Works Training
TIBCO BW 6.x Training
Valuable one thanks for sharing this post
ReplyDeleteFull Stack Training in Chennai | Certification | Online Training Course | Full Stack Training in Bangalore | Certification | Online Training Course | Full Stack Training in Hyderabad | Certification | Online Training Course | Full Stack Training in Pune | Certification | Online Training Course | Full Stack Training | Certification | Full Stack Online Training Course