Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug eclipse IDE itself

Tags:

eclipse

ubuntu

I would love to learn how to debug eclipse IDE. Back to the time when I was using VS for .NET development, I can attach VS to a process at anytime and start to trace down the problem. I hope there would be something similar with eclipse, but as a newbie to the Java world, I don't know about that.

My eclipse recently often hang when I run it together with iBUS (on Ubuntu 9.10). I hope that I can find out what really hang my eclipse and avoid that (Imagine your eclipse hang and every of your opened files were closed. It just drives me crazy).

like image 269
Phương Nguyễn Avatar asked Feb 24 '10 09:02

Phương Nguyễn


1 Answers

Edit your eclipse.ini file an add the following to the bottom (beneath -vmargs):

-Xdebug
-Xnoagent
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

Then in another Eclipse of the same version, you can import the plugins you are interested in debugging. File -> Import ... -> Plug-in Development -> Plug-ins and Fragments. Import From the active platform, and Import As "Projects With Source Folders", on the next tab select the plugins you are interested in.

Set breakpoints as appropriate.

Then create in Debug Configurations, create a new "Remote Java Application". localhost, port 8000. Add the Java projects on the source tab, and debug.

like image 65
Andrew Niefer Avatar answered Oct 26 '22 07:10

Andrew Niefer