Contact Free trial Login

Debugging Outside Studio

MuleSoft recommends against deployments to Mule 3.8. Standard Support for this version ended on November 16, 2018, and Mule 3.8 will reach its End of Life on November 16, 2021, when Extended Support ends.

In Anypoint Studio, you can use the Studio Visual Debugger to help you troubleshoot your app. If you’re creating your Mule app outside Studio, you can resort to the following options:

When Running From Eclipse

Select the Debug As > Mule Server start-up mode from your configuration file. Any breakpoint you set in your custom code or Mule’s source code suspends the execution and takes you to Eclipse’s Debug perspective.

When Running Mule Standalone

You can start Mule with the -debug option to activate remote debugging as shown in this Linux example:

$MULE_HOME/bin/mule -debug

With this option, Mule starts normally with the only difference being the following message logged in the console:

Listening for transport dt_socket at address: 5005

Mule is now remotely debuggable on port 5005. Should you want to use another port or configure the JVM to ponder until a remote debugger gets attached, edit the Mule start-up script that is relevant for your operating system and change the parameters found in the JPDA_OPTS property.

Switch to Eclipse and go the the Run > Debug Configurations menu. From there, create a Remote Java Application configuration. Ensure the port is 5005.

Also, in order to step debug with the source code attached, you need to add the source code of your Mule local instance as an external archive on the second tab of the configuration panel.

Click the Debug button at the lower right corner of the configuration screen. The local Mule instance resumes its start-up sequence and soon you’ll be ready to step debug.

Using a Non-Default Debug Port

See Starting Mule Server In Debug Mode for additional debugging options, such as changing the debug port from 5005 to another number.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub