Skip to main content

How to set debug points in IDE Intellij

 

Below are the steps to setup debug point in intellij


Open startup.bat file located in crx-quickstart\bin and locate "::* default JVM options" in the file 

Find : if not defined CQ_JVM_OPTS set CQ_JVM_OPTS=-Xmx1024m -XX:MaxPermSize=256M -Djava.awt.headless=true

Replace : if not defined CQ_JVM_OPTS set CQ_JVM_OPTS=-Xmx2048m -XX:MaxPermSize=1024M -Djava.awt.headless=true -debug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=30303


Explanation: In the above script we are increasing the JVM_OPTS size from 1024m to 2048m, increasing MaxPermSize from 256M to 1024M, and running the debug port on the 30303 port. 


Now in intellij we need to configure the debug port for core bundle 


Open Run from the intellij options



Open "Edit Configurations" and select "Remote JVM Debug"



Configure Name, Port, and Use Module classpath fields and select "Apply" and then "Ok"


Now after successful configuration, you can run the start.bat file directly and you can see the below messages while starting 


Now you can set the debug point in intellij and start debugging the code 

!!! Happy Learning !!!








Comments

Popular posts from this blog

AEM Virus Scan

 Does AEM provide Virus Scanning for DAM assets? Here is the solution that the Valtech Team provides. AEM Virus Scan (AVS) tool that greatly simplifies virus scans.  It supports Clam AV scanner out-of-the-box and can be extended by custom scanning engines. It also provides a GUI to see the latest alerts and allows to running of manual scans. The complete AVS package can be installed by updating pom.xml with the below dependency  AEM 6.5           < dependency > < groupId >de.valtech.avs</ groupId > < artifactId >avs.complete</ artifactId > < version >LATEST</ version > < type >zip</ type > </ dependency > AEM Cloud           < dependency > < groupId >de.valtech.avs</ groupId > < artifactId >avs.complete.cloud</ artifactId > < vers...

AEM dialog field restrictions to Group or Users

  A  Granite Render Condition  is a way of conditionally rendering a component in an AEM Touch UI dialog. User case: A set of AEM dialog fields need to be restrcited to a group of AEM users  Below is the Example for Custom Render Condition  Lets create a Sling model  import com.adobe.granite.ui.components.rendercondition.RenderCondition ; import com.adobe.granite.ui.components.rendercondition.SimpleRenderCondition ; import org.apache.jackrabbit.api.security.user.Authorizable ; import org.apache.jackrabbit.api.security.user.Group ; import org.apache.jackrabbit.api.security.user.UserManager ; import org.apache.sling.api.SlingHttpServletRequest ; import org.apache.sling.api.resource.ResourceResolver ; import org.apache.sling.models.annotations. Model ; import org.apache.sling.models.annotations.injectorspecific. Self ; import org.apache.sling.models.annotations.injectorspecific. SlingObject ; import org.slf4j.Logger ; import org.slf4j.LoggerFactory ; import j...