Debugging - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

As a developer you will need to be able to debug Content Services’ product code, and custom code contained in JARS/AMPs written by you (for more information on JARs/AMPs, see Extension Packaging (Modules)). To do this we usually use so-called Remote debugging. This means that we start up Content Services in debug mode ready to accept remote debugging sessions. We then connect with a debugger such as IntelliJ IDEA or Eclipse using a Remote debugging session.

IntelliJ provides a tutorial on how to do remote debugging with the IDEA IDE using a Hello World example. It is worth having a look at this tutorial before continuing with this article to get an understanding of how to attach a debugger to a remote process. If you are using Eclipse, then there is this article that might be a good read before moving on.

If you are using any of the Alfresco SDKs, then you should be looking at the following sections for information about how to do remote debugging in this environment: see the Debugging section in the Alfresco In-Process SDK documentation.

Content Services is slightly more complex than the Hello World example above. Let’s see how to debug a ReST API call, such as the login to get a ticket. For more information on the login, see Authenticate with the Repository.

Remote debugging can be done either by running Content Services in Docker containers or by running in a local Tomcat environment (see Install and Authenticate). For more information on debugging in Docker containers and Tomcat environment, see Debug in a Docker Environment and Debug in a Tomcat Environment (No Containers).