Debugging the Eclipse IDE itself

I would like to know how to debug an eclipse IDE. Back to the time when I used VS for .NET development, I can connect VS to the process at any time and start tracking the problem. I hope that something will look like eclipse, but as a newbie in the Java world, I don't know about that.

Recently, my eclipse hung up when I launched it with iBUS (on Ubuntu 9.10). I hope that I can find out what is actually eclipsing my eclipse and avoid it (imagine that your eclipse hung and all your open files were closed. It just drives me crazy).

+6
eclipse ubuntu
source share
5 answers

Edit the eclipse.ini file, add the following (below -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 that interest you in debugging. File → Import ... → Development of plugins → Plugins 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 appropriate breakpoints.

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

+9
source share

One thing you can do with any Java application to see what is happening right now is send kill -QUIT . This will cause the JVM to remove the stack traces for all of its threads into standard output. Do this three times with a second in between, and you can see which flows are not moving well.

Another thing to try is to attach the JConsole to the running process.

+2
source share

There is a thread about detecting the cause of Eclipse freezing .

One solution suggests running Eclipse with the -consolelog option . This can be useful for a quick overview of what is happening (before actually debugging).

+2
source share

Back to the point when I used VS for .NET development, I can connect VS to the process at any time and start tracing the problem.

Remote debugging is also possible in Java with the Java Platform debugger architecture (JPDA), you just need to run the application you want to debug with remote debugging enabled. Here is an article showing how to do this and how to configure Eclipse to debug the uninstall application.

Note that starting with Java 5, you should select the -agentlib:jdwp in the -Xdebug and -Xrunjdwp , as described in the Sun VM Options call .

Update: Eclipse is a Java application, so it should be possible to add the options mentioned in the article in eclipse.ini . Never tried it though (I missed the fact that you want to debug Eclipse itself).

+1
source share

There are basically two ways to debug a Java application (e.g. Eclipse). You can use JConsole, but it will not give you a lot of details. To attach JConsole you need to enable remote debugging; this requires a JVM argument, which you can write to the eclipse.ini file next to the Eclipse executable.

Another option is to run the runtime workspace from Eclipse: this is used to test your own plug-ins, but since the Eclipse plug-ins are the same, you can start a debugging session using the Eclipse application. To do this, you need at least one plug-in in the workspace (for example, create a new hello world plug-in project) and you can debug it as an Eclipse application.

0
source share

All Articles