Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see what triggered "Build workspace" in Eclipse

Tags:

eclipse

build

My eclipse is constantly running "Build Workspace" tasks. It is not a long running builds, more like 1 build a second. Sometimes I'd see 10 "Build workspace" tasks sleeping and waiting in the Progress tab.

I'd like to know what is triggering those builds. I have many plugins installed. What is the way to troubleshoot this?

like image 483
Vasiliy Avatar asked Mar 13 '12 14:03

Vasiliy


People also ask

Why is Eclipse Building workspace so slow?

In development, when you find the eclipse workspace build process is slower and slower, and if the main reason is because of validating static files ( for example validate JS, CSS, XML file, and so on). Then you need to reduce or remove the validators in the eclipse preference validation section.

What does building workspace mean in Eclipse?

It means Eclipse is rebuilding every relevant project in your namespace.

What does build all do in Eclipse?

Project > Build All (Ctrl+B) can be invoked at any time to trigger what auto-build was doing automatically. This allows you to build up a larger set of changes before invoking a build (Eclipse remembers which files have changed so that it does not have to do more work than required when you do ask for a build.


2 Answers

Here are some steps to help you debug what is going on.

  1. Download the Eclipse Classic SDK for whatever version of Eclipse you are currently using. For Juno that link is here.
  2. Open the eclipse.ini for your current normal eclipse and add the following options: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
  3. Start your Eclipse instance that you want to debug, it should pause at the splash screen
  4. Unzip the Eclipse classic SDK and start that Eclipse instance
  5. Open the Plugins view
  6. Find org.eclipse.core.resources
  7. Right click and select "Add to Java Search"
  8. Open Type dialog, type in "BuildManager"
  9. You should see a class from that plugin be given as an option, then open it
  10. Find the line that looks like: prereqs = currentBuilder.build(trigger, args, monitor); It should be about line 728 (For Eclipse Juno)
  11. Set a breakpoint here
  12. Create a new Remote Java Application debug configuration and point to localhost port 8000
  13. Launch this debug configuration
  14. You should see your other Eclipse instance startup

Now every time the Eclipse build manager fires off a build (which should happen on all of those Build Workspace jobs), then you will see this breakpoint be hit and you can find out what builder is firing.

Update 1

If you need source to other Eclipse bundles they can also be added in the "Plug-ins" view. Select all the plugins there and right-click and use Add to Java Search

like image 112
gamerson Avatar answered Sep 22 '22 19:09

gamerson


What plugins do you have installed that are currently active?

Press CTRL+3 type "plugin" and then choose plugin registry. In the plugin view right click and choose "Active Only"

Check the non-essential core plugins (for example related to servers which automatically build & publish)

Post a screenshot of active plugins if you need any more help

like image 45
Ganesh Krishnan Avatar answered Sep 18 '22 19:09

Ganesh Krishnan