Basic Steps to Debug an Error in AEM

There are times when something is not working as expected from the AEM Server; relax, you are fine. The error can be quickly identified through debugging on the server with a series of steps. Once the error has been identified you can attempt to solve the error efficiently. In this article, I will share with you the basic steps I take to quickly debug an error in AEM; following the order (in steps) will help you optimise and identify the problem quickly.

Common issues you may be experiencing can be:

  • Replication is not replicating properly.
  • Rendered page is missing a component.
  • Rendered page is blank.
  • Servlet is not registered.
  • etc…

1. Analyse Browser’s Console

When there’s an issue, be sure to take a look at the browser’s console log as the first action to take. The console log can show you errors that may help you pinpoint the error immediately, before looking at server logs.

The errors might be a third-party JavaScript library or from an external RESTFUl micro-service that is not related to AEM at all…

2. Analyse error.log

If the Browser’s console log has no relevant information, we can go ahead to review the error.log; this file can be found from ./crx-quickstart/logs/error.log.

The error.log catches exceptions that are output into the log file. Typically the logs in this file can help you quickly pinpoint the error. Whether the error will be from a bundle by your organisation, a bundle from the AEM product, or even a missing configuration, the logs will expose this information.

3. Analyse <custom>.log

When the error.log does not show you the relevant information you can take a look at your custom log files that exist in ./crx-quickstart/logs/*. The custom log files will be able to help you pinpoint your error.

Hello, I am an Adobe AEM MVP & a certified Lead AEM Developer who is currently working as a Senior AEM Full Stack Developer at Whitbread, UK, London. I have 10 years of overall web engineering experience and 6 years of AEM experience in practice. I hope to give back to the AEM Full Stack Development community by sharing my knowledge with the world.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top
Exit mobile version