Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Remotely Debugging an Eclipse Plugin

DZone's Guide to

Remotely Debugging an Eclipse Plugin

This tutorial will show you how to debug an Eclipse plugin remotely for bug resolution after it has been installed in the IDE.

· Performance Zone ·
Free Resource

Maintain Application Performance with real-time monitoring and instrumentation for any application. Learn More!

Introduction 

The Eclipse plugin can be debugged from inside the IDE while in the development phase, but once the plugin is installed in the IDE, we need to debug it remotely for bug resolution. In this quick tutorial, I'm going to explain how to debug an Eclipse plugin remotely. 

Plugin Project

Let's suppose we have developed our simple Hello World plugin and installed it in our IDE. Now, to debug the plugin remotely, please follow the steps below.

Step 1

Open the first instance of Eclipse IDE pointing to the workspace where your Hello World plugin project is located.

Step 2

Navigate to the eclipse.ini file of your IDE. Here is a screenshot of the location of the file in MacOS.

Image title

Now add the following JVM arguments to the file:

-vmargs
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044

Step 3

Now, open another instance of the Eclipse IDE (on MacOS, use the command open -a -n Eclipse in the terminal).This instance will point to a workspace different from the one which contains the Hello World plugin project.

Step 4

Now, in the workspace containing the Hello World plugin project, make the following remote debug configurations/; Navigate Run -> Debug Configurations -> Remote Java Application.

Image title

Then hit the debug button. Also, do not forget to put break-points in the codes of the Hello World plugin to be debugged.

Step 5

In the other workspace (which does not contain the Hello World plugin) try to use the Hello World plugin and it will be remotely debugged in the other instance of Eclipse.

Conclusion 

In this brief tutorial, I have shown how to debug an Eclipse plugin remotely. 

Collect, analyze, and visualize performance data from mobile to mainframe with AutoPilot APM. Learn More!

Topics:
eclipse ,tutorial ,performance ,debugging ,eclipse ide

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}