Hello fellow SAP Integrators and Community members!
This article offers a solution for writing and debugging Groovy scripts during iFlow execution. Currently, debugging Groovy scripts directly in SAP Integration Suite is quite difficult, and real-time debugging is simply not possible.
Below, I will share my approach to help you save time when writing and debugging Groovy scripts, without relying on third-party online services.
Spoiler alert: this is the result you'll get by the end of the article.
Scope and limitations of this article
This guide focuses specifically on how to build this live debugging tool. To keep things simple and avoid information overload, I will not go into detail about network configurations, access rights, or the step-by-step installation of the components. You can easily find installation guides for these tools online, so this article stays focused purely on the core method and idea.
Here is what we need to get started (versions are current as of this publication):
- Eclipse IDE version: 2026-06 (4.40.0)
- OpenJDK version 17.0.21 2026-10-20
- Groovy Development Tools 6.3.0
- Internet Information Services (IIS) for Windows
- HttpPlatformHandler v1.2 for IIS
- SAP library cloud.integration.script.apis-2.7.1 Download (sha1)
1. Eclipse Configuration
1.1. Install Groovy Development Tools (If not already installed)
- Open Eclipse and go to Help > Eclipse Marketplace in the top menu.
- Type "Groovy" in the search bar and press Enter.
- Find Groovy Development Tools in the list and click Install.
- Follow the prompts and restart Eclipse when it asks you to.
1.2. Prepare Your Groovy Project
- Go to File > New > Project... and choose Groovy Project.
- Give your project a name (for example, SAP_Integration_Suite_Groovy) and click Finish.
- Inside your project, create a new package (folder) named Integration_Suite_Scripts.
- Place the server.groovy and scrTemplate.groovy files inside this folder. (The files are attached to this article; you just need to set the correct name and extension.)
- scrTemplate.groovy - In our local debugging architecture, is the exact equivalent of the Groovy script you would normally create inside an SAP Integration Suite iFlow.
- Add the necessary SAP library cloud.integration.script.apis-2.7.1 to the project's build path.
1.3. Set Up the Remote Debug Configuration
- Click on Run in the top menu and select Debug Configurations....
- Look at the list on the left side and double-click on Remote Java Application to create a new profile.
- Give it a simple name at the top, like groovy.
- In the Connect tab, make sure the Project field is empty or points to your project.
- Set the Host to localhost.
- Set the Port to 5005 (this tells Eclipse to listen to the exact port your server opened for debugging).
- Link the Source Code (To prevent the "Source not found" error):
- Still inside the Debug Configurations window, switch to the Source tab at the top.
- Click the Add... button on the right side.
- Choose Java Project from the menu and click OK.
- Put a checkmark next to your project (SAP_Integration_Suite_Groovy) and click OK.
- Click Apply at the bottom to save your settings.
2. IIS Configuration
2.1. Install IIS and HttpPlatformHandler
- Enable Internet Information Services (IIS) in your Windows Features if it is not already active.
- Download and install the HttpPlatformHandler v1.2 extension from the official Microsoft download center.
- Verify that both Java and Groovy are installed on your machine and that their bin directories are added to your Windows system PATH environment variable.
2.2. Configure the Workspace Directory
- Navigate directly to your Eclipse workspace folder (e.g., the Integration_Suite_Scripts folder).
- Inside this directory, create a new empty subfolder and name it logs. The HttpPlatformHandler will use this folder to write server startup logs and errors.
- Place the web.config file inside the main workspace folder.
- Open the file in any text editor and paste the required XML code. This configuration instructs IIS to pass HTTP traffic to your Groovy script and injects the JAVA_OPTS environment variable required for Eclipse debugging.
web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<!--The -agentlib:jdwp... parameter opens port 5005 for the Eclipse connection.
suspend=n means that the script will start immediately, without waiting for the debugger to connect.
-->
<httpPlatform processPath="C:\Program Files\Eclipse Adoptium\jdk-17.0.21.9-hotspot\bin\java.exe"
arguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005 -cp C:\groovy-6.0.0\lib\* groovy.ui.GroovyMain server.groovy"
stdoutLogEnabled="true"
stdoutLogFile=".\logs\groovy-log"
startupTimeLimit="20">
<environmentVariables>
<environmentVariable name="HTTP_PLATFORM_PORT" value="%HTTP_PLATFORM_PORT%" />
</environmentVariables>
</httpPlatform>
</system.webServer>
</configuration>processPath: Specifies the exact absolute path to the Java executable (C:\Program Files\Eclipse Adoptium\jdk-17.0.21.9-hotspot\bin\java.exe).
arguments: Passes the execution commands directly to Java. It includes the debugger configuration (-agentlib:jdwp... on port 127.0.0.1:5005), the Groovy classpath (-cp C:\groovy-6.0.0\lib\*), the main Groovy runner (groovy.ui.GroovyMain), and your script (server.groovy).
stdoutLogFile: Defines the target directory and file prefix for saving logs (.\logs\groovy-log).
3. Create an Application Pool and Configure the Application in IIS
3.1. Create a dedicated Application Pool
- Open the Internet Information Services (IIS) Manager application.
- In the left Connections pane, right-click on Application Pools and select Add Application Pool....
- Name it GroovyPool.
- Set the .NET CLR version to No Managed Code (since Groovy runs on the Java Virtual Machine, not .NET).
- Set the Managed pipeline mode to Integrated, and click OK.
3.2. Configure the web application
- In the left pane, expand your server node, expand Sites, and right-click on Default Web Site.
- Select Add Application... from the context menu.
- Type an Alias (for example, groovy-api).
- Click the Select... button next to the Application pool and choose the GroovyPool you just created.
- Set the Physical path to your workspace directory and click OK.
4. Grant Folder Permissions
- Open Windows File Explorer, right-click your Integration_Suite_Scripts folder, and select Properties.
- Switch to the Security tab, click Edit..., and then click Add....
- Type IIS_IUSRS in the object names box, click Check Names, and click OK.
- Ensure the IIS_IUSRS group is granted Read & Execute, List folder contents, and Read permissions.
- Click OK to apply and save the changes.
5. Start Debugging
5.1. Verify the Server in Your Browser
- Start your IIS application pool or the server process.
- Open your web browser and navigate to http://localhost/groovy-api (or your configured local address).
- The browser should display the exact confirmation message we configured: "Groovy web service is successfully running under IIS. Debugging is connected!"
5.2. Set a Breakpoint in Your Code
- Open the scrTemplate.groovy file (or server.groovy if you are testing the server logic itself) in Eclipse and set a breakpoint on the desired line.
5.3. Attach the Remote Debugger
- In Eclipse, click Run > Debug Configurations....
- Expand the Remote Java Application section on the left, select your debugging profile (configured for localhost and port 5005), and click Debug.
- The Eclipse Debug perspective will activate, indicating it is successfully listening to the JVM.
6. Ready for Debugging!
- In SAP Integration Suite, create a simple iFlow and add a call to our API.
- To connect your cloud environment and your computer, use SAP Cloud Connector.
- You can trigger the process using a Timer event, or set up an endpoint using a tool like Bruno.
- Set a breakpoint in your module and run the iFlow.
As demonstrated, this local setup makes live, step-by-step Groovy debugging fully accessible directly during the execution of your iFlow.
Conclusion
In summary, this guide provides a step-by-step approach to building a local environment for real-time debugging of SAP Integration Suite Groovy scripts. By configuring Eclipse for your code and Internet Information Services (IIS) to handle the connection, you can test your scripts exactly as they run. We covered everything from installing the required tools and setting up your workspace, to configuring folder permissions and connecting to the cloud using the SAP Cloud Connector. Ultimately, this method allows you to catch errors and fix your code directly during iFlow execution, helping you save time without relying on any third-party online services.
I hope this local debugging setup saves you countless hours. Wishing you clean Groovy code, zero bugs, and clear skies in your SAP Cloud integrations!
@EvgeniiPolupanov
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.