{"id":13042,"date":"2014-04-24T11:00:30","date_gmt":"2014-04-24T05:30:30","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=13042"},"modified":"2016-12-19T14:54:38","modified_gmt":"2016-12-19T09:24:38","slug":"debugging-in-aem","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/","title":{"rendered":"Debugging in AEM"},"content":{"rendered":"<p>While working on one of a complex requirements in our <a title=\"AEM CQ5 Consulting\" href=\"https:\/\/tothenewco.pro\/wcm\/cq-aem-development-consulting\">Adobe CQ5 \/ AEM project<\/a> , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. <strong>Software Stack being used :\u00a0<\/strong><\/p>\n<ul>\n<li><strong>CQ Server<\/strong> : AEM 5.6.1<\/li>\n<li><strong>IDE<\/strong> : IntelliJIdea 12.0<\/li>\n<\/ul>\n<p>First We need to start our<strong>\u00a0CQ instance<\/strong>\u00a0in\u00a0<strong>debug<\/strong>\u00a0mode. We can do so by starting the AEM in debug mode by running the following command :<\/p>\n<p>[java]java -jar cq5-author-4502.jar -fork -forkargs &#8212; -Xdebug -Xrunjdwp:transport=dt_socket,address=59865,suspend=n,server=y -Xmx1520m -XX:MaxPermSize=512m -XX:-UseSplitVerifier[\/java]<\/p>\n<p>We need to first open the socket from where all the JVM communication will happen. We need to specify the port number while starting the instance. Socket specifies the entry point for all the communication that happens in JVM. Every communication will happen via Socket. In above command,\u00a0<code>address=59865<\/code>\u00a0 is creating the socket for us. In IDE, we need to setup a remote connection for CQ and specify the same port no as mentioned while starting CQ. Follow the below steps to setup a remote connection in IntelliJIdea.<\/p>\n<ol>\n<li>Go to <strong>Run<\/strong> panel (top of the window) and select <strong>Edit configuration.<\/strong><\/li>\n<li>Select<strong> Defaults\u00a0<\/strong>and click on &#8220;+&#8221; to add new configuration. List of all the options will appear. \u00a0Select <strong>&#8220;Remote&#8221;\u00a0<\/strong> from that list.<\/li>\n<li>Enter the details in the window as per your need. Specify the same port number which was used while starting the CQ instance in debug mode.<\/li>\n<li>Click on &#8220;OK&#8221; to save the configuration.<\/li>\n<\/ol>\n<p>Below is the screenshot for the reference.<\/p>\n<p>Add breakpoints in the java files which you want to debug by double clicking on the line and start newly created configuration in Debug mode.<\/p>\n<p><strong>Troubleshooting :<\/strong><\/p>\n<p>1. While starting the AEM instance, make sure JVM has enough heap size for running CQ server, otherwise it will fork the JVM and parameters will not be passed to the forked jvm. Use<strong>\u00a0-fork -forkargs &#8212;<\/strong> option to ensure that the command line parameters gets passed to the jvm.<\/p>\n<p>2. If you are using java 7 , make sure to specify the\u00a0<strong>-XX:-UseSplitVerifier\u00a0<\/strong>parameter to avoid the unwanted strict verification errors while debugging the bundle.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While working on one of a complex requirements in our Adobe CQ5 \/ AEM project , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. Software Stack being used :\u00a0 [&hellip;]<\/p>\n","protected":false},"author":110,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":67,"footnotes":""},"categories":[1],"tags":[1235,4847,1581,258,1207,2623,1394],"class_list":["post-13042","post","type-post","status-publish","format-standard","hentry","category-technology","tag-adobe-cq5","tag-aem","tag-aem6","tag-cms","tag-cq5","tag-cq5-migration","tag-debug"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"While working on one of a complex requirements in our Adobe CQ5 \/ AEM project , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. Software Stack being used :\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Geetika Chhabra\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Debugging in AEM | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"While working on one of a complex requirements in our Adobe CQ5 \/ AEM project , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. Software Stack being used :\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Debugging in AEM | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"While working on one of a complex requirements in our Adobe CQ5 \/ AEM project , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. Software Stack being used :\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/#article\",\"name\":\"Debugging in AEM | TO THE NEW Blog\",\"headline\":\"Debugging in AEM\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/geetika\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2014-04-24T11:00:30+05:30\",\"dateModified\":\"2016-12-19T14:54:38+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":3,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/#webpage\"},\"articleSection\":\"Technology, Adobe cq5, AEM, AEM6, CMS, CQ5, cq5 migration, Debug\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/#listItem\",\"name\":\"Debugging in AEM\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/#listItem\",\"position\":3,\"name\":\"Debugging in AEM\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/geetika\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/geetika\\\/\",\"name\":\"Geetika Chhabra\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d4d10ae5490b3414f10d296d1202d1ef60991ce054e15a10ede760cc241024e?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Geetika Chhabra\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/\",\"name\":\"Debugging in AEM | TO THE NEW Blog\",\"description\":\"While working on one of a complex requirements in our Adobe CQ5 \\\/ AEM project , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. Software Stack being used :\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-in-aem\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/geetika\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/geetika\\\/#author\"},\"datePublished\":\"2014-04-24T11:00:30+05:30\",\"dateModified\":\"2016-12-19T14:54:38+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Debugging in AEM | TO THE NEW Blog","description":"While working on one of a complex requirements in our Adobe CQ5 \/ AEM project , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. Software Stack being used :","canonical_url":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/#article","name":"Debugging in AEM | TO THE NEW Blog","headline":"Debugging in AEM","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/geetika\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"datePublished":"2014-04-24T11:00:30+05:30","dateModified":"2016-12-19T14:54:38+05:30","inLanguage":"en-US","commentCount":3,"mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/#webpage"},"articleSection":"Technology, Adobe cq5, AEM, AEM6, CMS, CQ5, cq5 migration, Debug"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/tothenewco.pro\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/#listItem","name":"Debugging in AEM"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/#listItem","position":3,"name":"Debugging in AEM","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/geetika\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/geetika\/","name":"Geetika Chhabra","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/9d4d10ae5490b3414f10d296d1202d1ef60991ce054e15a10ede760cc241024e?s=96&d=mm&r=g","width":96,"height":96,"caption":"Geetika Chhabra"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/","name":"Debugging in AEM | TO THE NEW Blog","description":"While working on one of a complex requirements in our Adobe CQ5 \/ AEM project , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. Software Stack being used :","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/geetika\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/geetika\/#author"},"datePublished":"2014-04-24T11:00:30+05:30","dateModified":"2016-12-19T14:54:38+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Debugging in AEM | TO THE NEW Blog","og:description":"While working on one of a complex requirements in our Adobe CQ5 \/ AEM project , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. Software Stack being used :","og:url":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Debugging in AEM | TO THE NEW Blog","twitter:description":"While working on one of a complex requirements in our Adobe CQ5 \/ AEM project , we felt the need to continuously observe the flow. Though, logs are of good help but we wanted to analyze the complete flow . In this scenario, debugging feature in IDE becomes very handy. Software Stack being used :","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"13042","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 11:51:20","updated":"2024-02-29 08:13:55","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDebugging in AEM\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Technology","link":"https:\/\/tothenewco.pro\/blog\/category\/technology\/"},{"label":"Debugging in AEM","link":"https:\/\/tothenewco.pro\/blog\/debugging-in-aem\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/13042","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=13042"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/13042\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=13042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=13042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=13042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}