---
schema_version: "1"
id: 454695e70e993a47ee78a53c7cdcd367e44f31b18831ace4a162b9912f63634b
title: Start the Mule Server in Debug Mode
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/studio/to-start-server-debug-mode.md
canonical_url: https://docs.mulesoft.com/studio/to-start-server-debug-mode
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2ffbc5d908e553ccc5075f17a00bf45409fd16163770e7a21c2c3507daed6213
description: MuleSoft Documentation Site
latest: true
---
---
product: Studio
---

# Start the Mule Server in Debug Mode

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

Start a Mule server in debug mode so that you can connect to it from Anypoint Studio and debug an
application remotely. You pass the debug parameters to the server on the command line or in the
wrapper configuration file.

1.  To start the server in debug mode, use the following parameters:

    <table><colgroup><col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><div><div><div><pre>-M-Dmule.debug.enable=true</pre></div></div></div></td><td><p><strong>Mandatory</strong>. Sets debugging mode in Mule. Issue this parameter first.</p></td></tr><tr><td><div><div><div><pre>-M-Dmule.debug.port=&lt;port number&gt;</pre></div></div></div></td><td><p><strong>Optional</strong>. Sets the listening port for incoming connections from Studio. If unset, the listening port will be 6666.</p></td></tr><tr><td><div><div><div><pre>-M-Dmule.debug.suspend=true</pre></div></div></div></td><td><p><strong>Optional</strong>. Sets "suspend" mode in Mule. In suspend mode, Mule will start, then immediately suspend application execution until it receives a connection on the debug port.</p></td></tr></tbody></table>

2.  To pass the parameters to the server, follow one of the two methods outlined below.

    1.  **Method 1**: pass the parameters to Mule on the command line in the appropriate order, as
        shown in the example below.

        ```text
        <$MULE_HOME>/bin/mule -M-Dmule.debug.enable=true -M-Dmule.debug.port=1234
        ```

        The command displayed above starts Mule in the foreground. To exit Mule when it is running
        in the foreground, press `Ctrl+C`.

        To start Mule in debugging mode in the background, issue `start` as the first parameter for
        the `mule` command, as shown below.

        ```text
        <$MULE_HOME>/bin/mule start -M-Dmule.debug.enable=true -M-Dmule.debug.port=1234
        ```

    2.  **Method 2**: include the parameters in the wrapper configuration file,
        `$MULE_HOME/conf/wrapper.conf`, as shown below.

```text
wrapper.java.additional.4=-Dmule.debug.enable=true
wrapper.java.additional.5=-Dmule.debug.port=1234
```

In the code shown above, replace the parameter number to reflect the number of active parameters in
your configuration file.

Before accessing and debugging your application on a remote server, you must first export and deploy
your application to the desired Mule server.

1.  In Studio, click the arrow next to the debug icon (represented by a small insect), then select
    **Debug Configurations**. Studio displays the **Debug Configurations** window.

2.  In the window’s left pane, click **Remote Mule Application**.

3.  Click the new configuration icon (represented by a blank page with a yellow plus sign) to add a
    new configuration.

4.  Enter the required parameters for the configuration:

    - **Name:** name for this configuration

    - **Host:** indicates the location of the remote Mule server

    - **Port:** indicates the listening port for the remote Mule server

You can debug an application on a remote Mule Server using **Remote Mule Application**. To do so,
you must start the Mule server in debug mode, then connect to the server from Studio.

> [!NOTE]
>
> - When you start Mule in debug mode, _all_ applications that you launch in that server run in
>   debug mode.
>
> - Remote debugging does not work with clusters.
