What does the "select automatically" option do for a Run configuration in Eclipse CDT - eclipse

In the Run Configuration... dialog in Eclipse CDT there is the option to configure the project to build automatically before launch. Within this area there is a "Build configuration" dropdown which selects which configuration should be used for the build:
This includes explicit options for the configurations in your projects, a "Use Active" option and a "Select Automatically" option.
The others are clear, but what does this last option do?

Related

Enable workspace resolution by default for m2e launch configurations

When I use Run as > Maven Build in Eclipse, "Resolve Workspace Artifacts" checkbox is unchecked by default. Is it possible to make it checked by default?
Number of Maven plugins may conflict with "Resolve Workspace Artifacts" feature (e.g. maven war plugin), so it is generally not recommended.
However, if you really need that feature, "Run as / Maven build" remembers previously launched and saved configurations and you can invoke them again from the same menu or using keyboard shortcut Alt-Shift-X, M.

How to see what triggered "Build workspace" in Eclipse

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?
Here are some steps to help you debug what is going on.
Download the Eclipse Classic SDK for whatever version of Eclipse you are currently using. For Juno that link is here.
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
Start your Eclipse instance that you want to debug, it should pause at the splash screen
Unzip the Eclipse classic SDK and start that Eclipse instance
Open the Plugins view
Find org.eclipse.core.resources
Right click and select "Add to Java Search"
Open Type dialog, type in "BuildManager"
You should see a class from that plugin be given as an option, then open it
Find the line that looks like: prereqs = currentBuilder.build(trigger, args, monitor); It should be about line 728 (For Eclipse Juno)
Set a breakpoint here
Create a new Remote Java Application debug configuration and point to localhost port 8000
Launch this debug configuration
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
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
You may have build automatically checked which will build when you save. Check under the nav Project > Build Automatically
Other way to close all unused projects.
Further, for good view, use filtering: View Menu -> filters -> Check 'Closed Project'.
Sometimes if you have > 20 opened projects you can observe constant 'build workspace' tendency.

Eclipse 3.7 runs auto build before executing ant task

My Project -> Builders list looks like this:
Ant
Android resource manager
Android pre compiler
Java builder
Android Package manager
"Build Automatically" option is turned off
If I run ant target from Ant view or as external tool then Eclipse makes this:
It builds my project (it runs all builders from the builders list)
Executes selected target
If I remove Ant from builders list it executes only selected ant target (that's what I want).
How can I make Eclipse launch only selected ant target without running other builders and without removing ant builder from the builders list?
Go to Run > External Tools > External Tool Configurations...
Choose the Ant build configuration for your project.
Click on the Build tab
Uncheck the "Build before launch" box.
Press "Apply" and "Close" buttons.
You can turn off "build before launch"
You have turned rebuild off for resource modification but I believe you have
not turned off "Build before launch"
Window>Preferences>Run/Debug>Build (if required) before launching

How do I disable "Run Monitor" in NetBeans?

I'm using NetBeans IDE v7.0.1.
When I try to run a program (F6 Shortcut), There is a pop-up window in the left side named "Run Monitor". How do I disable it?
Thank you all.
go into your project properties (right-click on the project --> properties or go to the "File" menu and select your project properties), select "profile" and uncheck the box "Show profiling indicators during run"
In more recent versions of NetBeans, we can disable HTTP monitor
in the Server Properties dialog. In the Services tab, we expand
the Server node. We right click on Apache Tomcat and select Properties.
In the Connection tab we uncheck the Enable HTTP monitor option.
We also may need to restart Tomcat.

How to change active launch configuration in Eclipse CDT

Feeling rather dumb: I have a C++ project, using Eclipse CDT (Eclipse 3.6, CDT 1.3.1).
I have defined more than one launch configuration: each points to a different executable within the project. But, when I press F11 to debug, Eclipse always loads the first configuration, and I can find no way to make it launch the 2nd one instead.
Surely this deserves a menu or dialog setting somewhere?
For each of your projects:
Project > Properties > C/C++ Build > Manage Configurations... > Set Active