Each time I press run button (or using shortcut for it), eclipse creates run configuration in some unpredictable way (looks like it uses currently selected file in PyDev Package Explorer, which is very strange). How to force eclipse to use only manually created run configurations and forbid to creating new one for the current project. I have 'Always launch the previously launched application' checked, but it doesn't help.
Related
I'm writing a python project in Eclipse with the PyDev plug-in, which contains multiple files.
However I'm used to using visual studio, where it'll automatically find the main function of a project and run the program from there.
Eclipse will always run the file I am currently editing (which usually is a file containing function that are called from the main function).
Is it possible to set which file should be run then clicking run? I've looked at the launch options under Project->Properties->PyDev, but didn't find what I was looking for.
When you press the Debug or Run button (Debug on the left) Eclipse tries to intelligently determine what to launch based on your current editor.
You can change the behaviour by editing Window -> Preferences -> Run/Debug -> Launching -> Launch Operation as pictured below.
The default of launching the current editor works well for some languages, but not as well for Python when every single file is itself a valid program to run. In your case I recommend changing to Always launch the previously launched application.
You can create a custom run configuration.
Right click on your project > run as > run configurations
From here is just a matter of choosing your project type on the left hand side and filling in the required information. You can click 'Run' to use your new configuration.
To get to this configuration again, you can click the 'Run' drop down button in the eclipse tool bar and see all of your run configurations.
Hope this helps!
I made a Scala package and a Scala application in Eclipse, but every time I try to run it from Run > Run, Eclipse asks me:
Select a way to run 'example.scala':
- Java Application
- Scala Application
How can I get Eclipse to know that the project or application file should always run as Scala?
Click on the menu item named Window in your Eclipse window.
Select Preferences from the drop-down list.
Once the Preferences window has opened, use the menu at the left to navigate to Run/Debug, then Launching
Under Launch Operation, tick the check box with the following description: Always launch the previously launched application.
Afterwards, Eclipse should ask you only once and remember that choice.
#soc describes a workaround to the problem. At the moment there is no other/better way to make this to work. It needs to be fixed in future.
Luckily, this issue is partially fixed in the current nightly build of the Scala IDE. There is a fix for another problem, that disables the "Run As Java" Option: Disable JavaLaunchableTester on Scala files
It works not for all cases, for example if one right clicks on a package the known "Run As" Options are displayed. But for objects with a main method it works quite well if one uses the "Run As" Option of the Source file.
I'm using FDT, and I want Eclipse to build my Main.as file instead of the currently selected file when I click debug/run. Is there a way to do this?
It depends on your settings and the order you've done things...
If you right click on a file and choose 'Run As' or 'Debug As', FDT (Eclipse) will use that file to build your application around.
If you have 'Always launch the previously launched application' enabled (it should be enabled by default) then FDT will always use the last used launch configuration whenever the Run / Debug button is clicked. If none exists then it will run using the currently active file. To enable this setting, go to Preferences > Run/Debug > Launching and look at the bottom where Launch Operations is.
If you have a launch configuration already created, and it sounds like you do, you'll need to adjust the 'Main' file within that launch configuration. Do this by choosing 'Run Configurations...' via the Run button drop down.
I've written a tutorial about this. It should help you get through it.
http://fdt.powerflasher.com/docs/Launch_Configuration_Tutorial
I am writing some scripts in Eclipse 2.7 RC4, using the latest Groovy Eclipse plugin.
Everything works fine except that I have a Run Configuration that I created that passes 2 arguments to the script but every time I click the Play button to run the project, Eclipse creates a new Groovy Script Run Configuration called "Server (1)". If I click the Play button again, Eclipse creates another Run Configuration called "Server (2)", etc.
So, every single time I want to run my project, I have to go in and delete the last run configuration it made.
Why does Eclipse do this? Can't I lock the configuration so that it wont change?
I realize this question is quite old but it's still an issue that happens (as it was happening to me today) I played around with it a little and found that in the 'Run Configurations' window where you can set Arguments/Classpath variables etc there is also a tab named Common. I found that within this there is an option called "Save as" and if the 'Shared File:' option is selected (pointing to the exported launch configuration) it will keep creating new Run Configs every time you run it. If you instead select the Local File option and Apply the changes, I believe you will stop seeing new run configs saved each time. This worked for me, at least!
This is probably a bug in Groovy-Eclipse in that it is not recognizing that an existing launch configuration is the "same" as a new one.
Can you get around this by simply re-using the old on explicitly, ie- by clicking on the little arrow to the right of the run button and choosing the old configuration:
I am seeing the same thing for Java and Scala test programs I created in Juno version of Eclipse (latest as of Nov 2012). Very irritating to have to delete all those run configurations explicitly.
Since setting up Eclipse with the DLTK plugins for TCL (from a fresh install) I've noticed that every time I attempt to 'run' or 'debug' I'm prompted to choose a run configuration. These are listed as 'Tcl Script' and 'Tcl Testing'.
The run configuration propery panel shows both 'types' of configuration, but has no facility to remove them (the types, not the configurations themselves).
Is there any way I can remove the 'Tcl Testing' config type? Or some other way to prevent it asking me which type I want to use every time I run/debug a project?
I've tried ensuring I have only a single configuration defined, but it still asks me which configuration type I'd like to launch.
Setup a new Debug Configuration of whichever type you want. Under the common tab check off the 'display in famorites menu' boxes. Hit Apply, then Debug. It should launch properly.
From then on, when you hit Debug (or at least F11, as I do) it will launch that debug config every time. If you run something else, that config will be an option in the drop-down.