---
schema_version: "1"
id: e5afd6bd5defb01e780aeef837f9a49b0b3e2a7cacd8d73332ffb6e8d6012429
title: Debugging Outside Studio
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-runtime/4.9/debugging-outside-studio.md
canonical_url: https://docs.mulesoft.com/mule-runtime/4.9/debugging-outside-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: cc08a4e290ec48ca97ff62ccc45fb4846f9b9bc56b060a67e76b3770fb98508b
description: MuleSoft Documentation Site
release: "4.9"
latest: false
---
---
product: Mule Runtime
version: 4.9
keywords: debugging, debug
---

# Debugging Outside Studio

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

To troubleshoot a Mule app in Anypoint Studio, you can use the
[Studio Visual Debugger](https://docs.mulesoft.com/studio/visual-debugger-concept). This lets you set breakpoints to
stop execution and check events.

If you’re creating your Mule app outside of Studio, you can either use MUnit to test your app, or
you can activate remote debugging.

## Use MUnit to Test an App

MUnit is a Mule application testing framework that allows you to build automated tests for your
integrations and APIs. It provides a full suite of integration and unit test capabilities, and is
fully integrated with Maven and Surefire for integration with your continuous deployment
environment.

For more information, see the MUnit documentation.

## Activate Remote Debugging

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 and logs the following message in the console:

Listening for transport dt\_socket at address: 5005

Mule is now remotely debuggable on port 5005. Follow these steps to debug Mule:

1.  Access Eclipse, and select the **Run > Debug Configurations** menu. From there, create a
    **Remote Java Application** configuration that uses port 5005.

2.  Add the source code of your Mule local instance as an external archive on the second tab of the
    configuration panel.

3.  Click the **Debug** button at the lower right corner of the configuration screen. The local Mule
    instance resumes its start-up sequence and you can debug the app step-by-step.

If you want to use a port other than 5005, change the JPDA\_OPTS property file in the Mule startup
script before following the steps for debugging Mule.
