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: 
TJe
Product and Topic Expert
Product and Topic Expert
This blog is written to demonstrate how to debug a Custom Task Template you have created using  the tutorial How to create a Custom Task Template for BI Automation Framework.

Troubleshooting a problem in the Java code of your Task Template is not an easy task. But debugging helps and can even simplify the implementation and usage of other SDKs.

Here are the steps to enable and use Remote Debugging in BI Automation Framework.

BI Agent



  1. Open Central Configuration Manager (CCM)

  2. Stop the BI Agent in the CCM

  3. Modify JMV options in file AgentReg.BAT
    browse to the location of the file on your server: '..AdminConsole\Agent\'
    edit the file and add the following options to enable remote debugging on port 5005: ;-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
    your line should look like:
    set PR_JVMOPTIONS=-Duser.language=DE;-Duser.region=de;-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

  4. Save the file

  5. Update the agent registration using the new version of AgentReg.bat
    run AgentDereg.bat (remove the BI Agent from the list in CCM)
    run AgentReg.bat (add the BI Agent to the list in CCM)

  6. Start the BI Agent in the CCM


In your Eclipse IDE



  1. Add breakpoint in Java code

  2. Create a Debug Configuration for your custom task template
    host: localhost
    port: 5005 (same as specified for BI Agent)

  3. Start the Debug mode
    on the previous dialog or from the toolbar


BI Automation Framework



  1. Define a scenario with the custom task template

  2. Run the scenario


In your Eclipse IDE



  1. The execution will stop on your breakpoint

  2. Debug in Eclipse


Additional Information


If you change the Java code of your custom task template, you have to Export and Deploy the Custom Task Template Plug-in to the Agent before you can debug (see export and deploy on blog How to create a Custom Task Template for BI Automation Framework).

The plug-in Java code and the plug-in active in BI Agent must be in synch.