---
schema_version: "1"
id: 7bf7f4904d3f694a1ffa5f056116143d886a99d414f79775f35858c241a7f8ae
title: Debugging Outside Studio
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-runtime/4.12/debugging-outside-studio.md
canonical_url: https://docs.mulesoft.com/mule-runtime/4.12/debugging-outside-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 71d776e7f33d4232ca544acd4aabc54f98d28b5b9454b9d438349158a9bd78c7
description: MuleSoft Documentation Site
release: "4.12"
latest: false
---
---
product: Mule Runtime
version: 4.12
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.
