Reputation: 333
I have a question regarding debuging an Eclipse plugin in production (Hibernate Tools).
I downloaded the source package from JBoss repo, but I am unable to view org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter
source code and add a breakpoint.
I am just running a normal Java EE instance of Eclipse.
Is it possible to do something like that?
Upvotes: 1
Views: 953
Reputation: 4122
The steps are descibed quite well here: https://stackoverflow.com/a/13330393/4916630
Install plugins only or download the complete JBoss Developer Studio (Luna) from here: http://tools.jboss.org/downloads/devstudio/luna/8.1.0.GA.html#marketplace
Now you will have plugin working in the IDE.
To remote debug your plug-in, first add debug arguments to your target Eclipse .ini file
-vmargs
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
before launching it.
Then open another Eclipse instance with a workspace containing your plug-in project (here only source of the plugin is needed). Open Run > Debug Configurations..., select Remote Java Application and create a new configuration.
As Project, browse and select your plug-in project. Also fill in your connection properties (host of target Eclipse and port 1044).
Launching the newly created debug configuration allows you to debug your plug-in the same way you debug locally.
Upvotes: 0
Reputation: 2110
You need to import the plugin into your workspace :
Right click on explorer > Import ... > Plugin and fragments
then, on first page :
**Import From :** The active target platform
**Plugins and Fragments to Import :** Select from all plugins...
**Import As :** Project with source folder
On the second page :
Double click on the plugin wanted (probably org.hibernate.*)
Then finish, the plugin should be available as source for debugging in your workspace.
Upvotes: 1