Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sriram_Sreepathi
Associate
Associate
1,003
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.
2 Comments