Debugging of camunda application

How we can debug camunda application.?
(Using tomcat server)


You should always begin by Unit testing your process before deploying it.
Reading the docs on testing your process will have all the information you need.

If you do indeed need to debug on Tomcat, please investigate on the topics “remote debugging in Java”, “remote debugging in your IDE”, “how to enable remote debugging on Tomcat”. There should be plenty of resources on the web for that.



Also consider the use of the Listeners as place to create debugging log entries. I use them extensively.

Here’s a bit of JavaScript that shows how I use them to print out process variables. Note that I have a conditional statement the evaluates a process variable so that I can control whether or not these print. So in your payload, you can turn this logging on and off. The additional lines of output around the process variables are intended to make it easier to find this output in the logs.

if (execution.getVariable("debugMode") == 'true') {
    print("DEBUG PROCESS INFO");
    print("processVariable_1:         |" + execution.getVariable("processVariable_1") + "|");
    print("processVariable_2:         |" + execution.getVariable("processVariable_2") + "|");

The nice thing about this is that it works in any Java container.

1 Like

I recently did this using the camunda docker container, so i thought i could share the info.
First thing is switching on remote debugging in Tomcat, which is done by running it with start parameter jpda. In the container, change the last line of the startup script (/usr/local/bin/ to

exec /camunda/bin/ jpda run

By default, remote debugging should be available at localhost:8000.

docker only:
jpda address has to be set to in /camunda/bin/

export JPDA_ADDRESS=""

Finally, don’t forget to expose the port.

1 Like