Skip to main content
Level 3
May 28, 2025 8:54 AM UTC
Solved

AEM Code Debuggng

Hi all,

 

I want to debug aem code line by line and examine values of variables.

 

Could you point me to a tutorial for this please.

I do not need any complex code to debug. Just a simple component with a small Sling Model will be enough.

 

I have Visual Studio Code.

 

Appreciate all your replies.

 

Thanks,

RK.

Rama_KrishnaNyAccepted solution
Level 3
May 29, 2025 1:09 PM UTC

Please guide me on AEM On Prem version of AEM Code Debugging.

 

Thanks,

RK.


Hi all,

 

Thanks for all your replies.

I realize that debugging On Prem AEM is similar to that of On Prem.

 

But the below two tutorials are specifically for On Prem and are very useful:

1. How to debug AEM Project: https://www.youtube.com/watch?v=4jLOhWuPUuc

2. AEM Application Debugging with Visual Studio Code: https://jimfrenette.com/2019/12/aem-app-debug-visual-studio-code/

 

Now, this post could be closed.

 

Thanks,

RK.

6 replies

giuseppebaglio
Level 10
May 28, 2025 9:05 AM UTC

This page explains how to remotely debug AEM SDK using VS Code by configuring the AEM runtime and setting up the IDE to connect for live code analysis.

You can install the AEM WCM Core Components to obtain the same pages shown at https://www.aemcomponents.dev/ in your local AEM instance. At this point, you can configure the remote debugger and step through any component's code line by line.

Translate
SureshDhulipudi
Community Advisor
Community Advisor
May 28, 2025 11:25 AM UTC

you can watch this video:

 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/debugging/debugging-aem-sdk/remote-debugging

 

-How to start your AEM server in debug mode.

-How to debug in VS code

-How to debug a servlet

Debug command : ` java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar aem-author-p4502.jar`

 

 

Translate
Level 3
May 28, 2025 2:23 PM UTC

I am sorry.

 

Forgot to mention that I have AEM On Prem only, not Cloud.

 

Thanks,

RK.

Translate
Level 3
May 29, 2025 3:23 AM UTC

Please guide me on AEM On Prem version of AEM Code Debugging.

 

Thanks,

RK.

Translate