Setting up remote debugging for Burp extensions

Remote debugging involves attaching your IDE's debugger to a separate running instance of Burp Suite. This enables you to inspect your extension's execution within Burp in real time, making it easier to diagnose issues and refine your extension's behavior.

This guide explains how to attach a debugger to Burp Suite's Java Virtual Machine (JVM) from your IDE.

Prerequisites

Before you begin, make sure you have set up the following:

Note

We recommend running Burp and your IDE on the same machine for remote debugging.

Step 1: Configure a remote debugging session

To configure a remote debugging session in your IDE:

  1. Open your Burp extension project in your IDE.

  2. Create a new remote debugging configuration. Depending on your IDE, this may be labeled as something like Remote JVM Debug, SocketAttach, or Remote Java Application.

  3. Configure the following connection details:

  4. Save the configuration.

Your IDE is ready to connect to Burp's running JVM.

Step 2: Start Burp with remote debugging enabled

Launch Burp with remote debugging enabled by running the following command in a terminal:

java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address="*:5005" -jar "FILE_PATH.jar"

Modify the command as follows:

After running this command, Burp will start as usual but will listen for debugger connections.

Step 3: Attach your debugger to Burp

Now that Burp is running with remote debugging enabled, attach your IDE's debugger to it:

  1. In your IDE, select the remote debugging configuration you created earlier.

  2. Start the debugger to attach it to Burp.

  3. Build and load your extension in Burp. If your extension is already loaded in Burp, rebuild and reload it. This ensures that the code in your IDE matches the compiled code Burp is running. For instructions on loading your extension in Burp, see Loading your extension in Burp.

The debugger is now attached to Burp. You can begin debugging your extension. To learn how to set breakpoints and debug your extension, see Debugging extensions with a remote debugger.

Note

We recommend disabling all other installed extensions so that you can test this extension in isolation. This helps prevent unexpected behavior caused by interactions with other extensions.

Troubleshooting

If the debugger fails to attach, try the following: