Skip to Content
Technical Articles
Author's profile photo Sriram Sreepathi

Debug Java Code in Agentry Cloud Edition (ACE)

The purpose of this article is to explain the steps required to debug java source code where Agentry Cloud Edition (ACE) server is running as java application in BTP sub-account. Please note that the steps are not applicable for ACE running in subscription mode (preview, production etc.)

Agentry Cloud Edition is a java application on SAP BTP. Let’s download the SDK for BTP from https://tools.hana.ondemand.com/#cloud

Extract the zip file to a folder

SAP BTP infrastructure runs on SAP’s own implementation of a Java Virtual Machine – SAP Java Virtual Machine (JVM).

SAP JVM is a certified Java Virtual Machine and Java Development Kit (JDK), compliant to Java Standard Edition (SE) 8. Technology-wise it is based on the OpenJDK and has been enhanced with a strong focus on supportability and reliability. One example of these enhancements is the SAP JVM Profiler. The SAP JVM Profiler is a tool that helps you analyse the resource consumption of a Java application running on theSAP BTP local runtime. You can use it to profile simple stand-alone Java programs or complex enterprise applications. Let’s download the SAP JVM from https://tools.hana.ondemand.com/#cloud

Extract the zip file to a folder

Download the eclipse and install it in the system

Set up SAP Development Tools for Eclipse

  • Open Eclipse and go to Help  Install New Software
  • In the Work with field, enter https://tools.hana.ondemand.com/oxygen and choose SAP BTP Tools.
  • Choose Next and follow the installation wizard

Configure the JRE in Eclipse

Setup runtime environment

Import java source code, adjust java path variables and build the project. Set couple of breakpoints

Logon to BTP account where ACE is provisioned as Java application and start it

Using Mobile Services, setup Agentry based application like SAP Work Manager and make sure the app can start successfully and has connectivity to the backend

Setup Debug Configuration in Eclipse:

  1. Go to the Eclipse IDE, open theRun menu and choose Debug Configurations.
  2. Create a new debug configuration of type SAP HANA Cloud Debugger.
  3. In the Project section, choose the Java project that is already imported in the Eclipse IDE.
  4. In the Connection Properties section, provide the application data.
  5. ChooseDebug.

Initiate sync from Agentry application e.g., SAP Work Manager and in Eclipse switch to Debug perspective

Select the Java Project from Eclipse

Once the source code is mapped successfully, the debugger should show up the source code in the debugger view. As soon the breakpoint is hit, the view would be something similar to below where you can inspect the values and so on.

When done with the debugging, use disconnect option to disconnect the session.

Hope the above step-by-step guide would enable you to setup eclipse and debug Agentry based project hosted on Agentry Cloud Edition.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Andres de la Pava
      Andres de la Pava

      Hello Nice Article really help full

       

      but what about for ACE running in subscription mode ??

       

      Thanks in advance