This page describes how to set up standard IDE debugging tools to work with Atlassian plugins.
Since plugin are deployed as part of another application (e.g., Confluence or JIRA), you can't just start your IDE in debug mode to debug the plugin. Your IDE must connect to the Atlassian application that hosts the plugin. In terms of your IDE configuration, the Atlassian host application needs to be configured as the remote debug target.
To connect to an Atlassian application, you need to connect to it in debug mode. With the SDK, you use the atlas-debug command to start the application in debug mode. By default, this command opens port 5005 as the debug port, the default for Java debugging. But you can specify another using the parameter. When setting up your debug target, configure this port value as the debug port, as described below
If you have not already done so, start the Atlassian application using the command. For example:
atlas-debug --product confluence
When the Atlassian application finishes starting up, go to Run > Debug and choose your new remote target profile.
You can now attempt to use your plugin in the Atlassian application to generate and receive debugging information in IDEA.
You can now start the Atlassian application in debug mode and connect to it from Eclipse.