How to Debug Your Plugin

Bugs happen! In this tutorial, you will learn how to debug your Adobe XD plugin.

Prerequisite

At least one plugin created and added to the UXP Developer Tool.

Debugging Options

To debug your Adobe XD plugins, you'll be using the UXP Developer Tool. However, you can glean some useful information by using the built-in Developer Console provided by Adobe XD. (Note that this is a legacy feature and will be going away in the future.)

Debugging with the UXP Developer Tool

1. Load your plugin

  1. If you haven't already, launch the UXP Developer Tool application.
  2. Next to the plugin you want to debug, find the ••• button and click it. Select Load to load this into XD.

2. Launch Debugger

  1. Click ••• > Debug. This will launch a Chrome Developer Tools environment that you can use to debug your plugins.

What works, what doesn't

Currently, you can...

Important caveats:

Quick debugging with Developer Console

1. Check the Developer Console

In XD, click Plugins > Development > Developer Console (Legacy).

This displays information similar to what you'd find in the JS debugger's console view:

The console output for all installed XD plugins is mixed together in one single view here.

2. Reload your plugin after making fixes

Note: The develop folder can be used during plugin development, and is the only folder XD will reload plugins from when you reload plugins from the Plugins menu. XD makes it very easy for you to get to the develop folder: simply go to this menu item: Plugins > Development > Show Develop Folder.

You can easily iterate on your plugin code without having to restart XD. Switch to the UXP Developer Tool, and click Actions > Reload All, which will force the developer tool to reload all loaded plugins.

There's also a handy keyboard shortcut in the UXP Developer Tool to make reloading easier:

Platform
Keyboard shortcut
macOS
Shift-Cmd-R
Windows
Ctrl-Shift-R

If there are any errors blocking the plugin from loading, they will appear in the Developer Console on reload:

Error during reload