AEM Code Debuggng | Community
Skip to main content
Level 3
May 28, 2025
Solved

AEM Code Debuggng

  • May 28, 2025
  • 3 replies
  • 868 views

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.

Best answer by Rama_KrishnaNy

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.

3 replies

giuseppebaglio
Level 10
May 28, 2025

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.

SureshDhulipudi
Community Advisor
Community Advisor
May 28, 2025

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`

 

 

Level 3
May 28, 2025

I am sorry.

 

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

 

Thanks,

RK.

Level 3
May 29, 2025

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

 

Thanks,

RK.