Configure IDE to Debug Java Functions
For the purposes of this help documentation we are going to illustrate how to configure debugging preferences of Java non-HTTPS and Integration functions in Visual Studio Code, IntelliJ IDEA, and Eclipse IDEs.
If you wish only to tunnel your functions and you have used the following CLI command then no IDE configurations is required.
This command will only tunnel your functions and publish the logs of the functions in the Catalyst CLI.
Configure Visual Studio Code IDE’s Debugger
-
Ensure you have all the functions you need to debug in the local machine, and open the concerned project in VS Code.
-
Click the Run/Debug button present in the menu-bar and create a launch.json file, by clicking the “create a launch.json file” option.
This is how the launch.json file appears before you begin configurations.
- Copy the JSON snippet below and paste it as value in the “configurations” JSON key.
“configurations”: [{
“type”: “java”,
“name”: “java_cron”, // name can be any name but having the same function name will be helpful while debugging
“request”: “attach”,
“hostName”: “localhost”,
“port”: 9001,// The debug port number which you specified in the catalyst functions:shell –tunnel 8001 –debug 9001. The port number can be any number which is not being used by any other processes
“projectName”: “java_cron”// The function name
}],
- Save this file and apply the breakpoints in your required lines of code and proceed to the next step.
Configure IntelliJ IDEA IDE’s Debugger
- Import your project directory in IntelliJ IDE, and configure the run time JDK to match your Java version.
-
Click the + icon, select Remote JVM Debug option from the pop-up, and click OK.
-
Ensure you set the following values in the pop-up:
-
Set the required debugging points in your code, and proceed to the next step.
Configure Eclipse IDE’s Debugger
-
Ensure your Java stack and JDK are in the same version by right-clicking your project list and selecting Build Path > Configure Build Path.
-
Select Project Natures. Search for “Java”, select “java” from the list and click OK.
-
Ensure Java Compiler is selected, and click Apply and Close to add the Java compiler for your project.
-
Next, right-click your project directory and click Debug As > Debug Configuration.
-
Search for Remote Java Applications, right-click on the search result and select New Configurations.
You will be directed to a Debug Configurations pop-up. -
Ensure you have configured the debugger with the following values:
-
Connect tab:
-
Source tab:
Once you have applied the required configurations, click Debug.
- Open your function file and set your required debug points in your code, and proceed to the next step.
Last Updated 2025-08-28 12:01:44 +0530 IST
Yes
No
Send your feedback to us