Eclipse with DLTK plugins for tcl, has multiple "Run Configurations" - eclipse

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.

Related

How to enter debug mode in eclipse when launching tomcat from cmd

I am using apache-tomcat-8.5.24 and have the workspace in Eclipse configured and tomcat working properly.
I need though to do some debugging, but I dont know how can I enter debug mode in Eclipse with the tomcat running from cmd? I have done it several times in the past but I was always launching tomcat in debug mode from my IDE.
You would have to enable remote debugging on tomcat for which the following catalina property needs to be added in tomcat startup.sh or tomcat.start.sh or wherever you add tomcat startup properties:
CATALINA_OPTS="$CATALINA_OPTS
-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
Then restart tomcat.
After this is done, you need to open eclipse, and to go "Debug --> Debug Configurations -- type in the search box "remote java application", and create new, then select your module/java project which you want to debug and give the port number same as given in the above command (i.e. 8787 in the example above). Then Apply and launch.
While the other answer may solve someones problem, it didnt solve mine. Though the way i followed and solved my problem is:
First you start tomcat (all services up), and then you start the debug mode in eclipse!!!
For tomcat as i use the catalina.bat jpda run to start my tomcat i just edited it and used it as follows:
catalina.bat jpda run - agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
For eclipse:
1)In Eclipse’s menu, select Run > Debug Configurations…
2)A new Debug Configurations window will appear
3)In the list on the left, select Remote Java Application. Don’t worry
too much about the word “remote” here. It just means that the JVM
process can either be on the local machine or another machine across
the network.
4)Select New in the context menu (you can either right click to see
the option for it, or select the icon above the list)
5)A new Remote Java Application debug configuration window will appear
6)Change the Name field to say “Tomcat (local)”, or the name of your
web application, your choice. The name you put here can be anything,
but shorter is better because the name will show up in menus.
Eclipse Run Configuration for a separate Tomcat JVM
There are at least three subtabs of configuration: Connect, Source,
and Common. Under the Connect subtab, there is a Project field. Select
the Eclipse project that represents the code you want to debug. For
instance, if you want to debug your webapp, select your webapp’s
Eclipse project here.
All of the other default settings should be fine. You should probably
look through the settings to see if you would like to change any
options, just beware of changing settings if you aren’t sure what the
effect will be. Make sure that the port number you’re setting in the
Connect subtab is the same port number you configured your Tomcat
JVM’s debug server to listen on.
Click Apply, then click Debug. At that point, your Eclipse’s debugger
will connect to your Tomcat JVM’s debug server. Next, switch to the
Eclipse Debug perspective. In Eclipse’s menu, select Window > Open
Perspective > Debug.

Is there any difference between "Run Configurations..." and "Debug Configurations..."

In Eclipse (Mars, probably older versions too), the Run menu has Run Configurations... and Debug Configurations..., both of which open the same dialog window. The only functional difference I've found so far is that one has a "Run" button, and the other has a "Debug" button.
It looks like both dialog windows can be used to edit Launch Configurations, but it's not clear if there are two separate configurations for Run vs Debug, or if they are the same.
Is there any substantial difference between the two dialog windows, other than the button next to the "Close" button?
Bonus question: Is there another way to view and edit Launch Configurations besides the two menu options I mentioned (and their equivalents in various toolbars)?
There is only one configuration which is shown in both the Run and Debug Configuration dialogs.
The configuration is actually stored in the workspace .metadata in the .plugins/org.eclipse.debug.core/.launches folder. There is one xxx.launch file for each configuration.

How can I get MoreUnit to debug tests rather than run them?

I've just started using MoreUnit and it seems quite handy. One thing that I am missing however is how to run tests using the debugger right away rather than just plain Run (using ^R).
It's not in the context menu and I have tried a few keyboard shortcut variations to no avail...
Usually in Eclipse, you can just click on the debug button after running the tests normally to debug them (the last run will have created a launch configuration that you can also access from the debug menus).
Other than that, you should find a "Run as MoreUnit test..." in both the "Run" and "Debug" menus (if not, file a feature request).
Lastly, you should be able to open the "Launch Configuration" wizard by selecting "Debug..." and there should be a folder for MoreUnit in the tree on the left. Above the tree is a "+" option to create entries in a folder.

How to forbid creation run configuration in PyDev

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.

How can I clean up Eclipse "run configurations"

I set my java runtime options in Eclipse's Window > Prefs > Java > Installed JREs > Default VM Arguments. Since this setting is sufficient for all my main() entry points, I do not bother with customizing the "run configurations". It looks like nice flexibility but I probably will never need it. I was worried that I would have to repeat my VM arguments in the run configurations and so I started to copy my VM arguments but after an experiment it seems that I do not have to. Now I will have the opposite worry that I have some unintended customizations.
To eliminate the second worry, is there a way to eliminate the clutter visible in the Run drop down menu? What about the "Launch configurations" visible in the JAR export dialog? Is a run configuration the same thing as a launch configuration? How do I eliminate the multiple launch configurations?
I am on Eclipse Indigo on Ubuntu.
Edit After I manually delete all the run configurations, and proceed to do an export, buttons are greyed-out so I can't proceed. When I select the launch configuration drop-down, I end up with only one choice, from an unrelated project. I then created a run configuration for the real main entry point for the current project. I expect the clutter will return as I continue to use Eclipse.
One simple way would be to organize your projects by Eclipse workspace, which would limit the "run configurations" list only to the project referenced in a given workspace.
Switching workspaces would reset that list to the ones recorded for the projects of the new workspace.
Note: the OP's answer regarding launches file location isn't the only location possible.
The official one is:
${WORKSPACE}/.metadata/.plugins/org.eclipse.debug.core/.launches
But you can copy them enywhere else you want (as explained in "How do I save Eclipse launch profiles across workspaces?"), either by manually copying those files or by sharing them:
See "Which eclipse files belong under Version Control".
Once you know where they are saved, a simple delete is enough to make them disappear from the launcher menu.
The answer comes from #Francisco Puga
Experimental evidence shows that deleting "launches" seems to make run configurations disappear so it would seem that they might be synonymous.