15

I have an Eclipse workspace with a bunch of projects. I manually created some run configurations for each project (it's necessary to pass some arguments to VM, so I can't just run it directly, e.g. using shortcut ALT+SHIFT+X, T in the specific file).

Most of the time, I just use one run configuration (whereas for the first time I manually launch it using Run -> Run configurations -> (name) -> Run). Since I configured Eclipse to always run the last run configuration (on F11 or CTRL+F11), it's usually enough.

However, sometimes I need to switch to a different run configuration and then back to previous one and then to a different one etc. Is there a quick way to do it? I'd like to see a shortcut, which would display pop-up window with all existing run configurations. By typing first few letters, I'd find an appropriate one and would be able to immediately run it by pressing ENTER. I mean something similar to what CTRL+SHIFT+T or CTRL+SHIFT+R looks like.

I'm afraid there's not something like that. Nonetheless, any advice on how to get more effective would be greatly appreciated, because I'm bored of switching run configurations via menu (as I described above). I can press ALT+R, N and then select a run configuration using arrow keys, but it's not really that comfortable.

TT--
  • 2,956
  • 1
  • 27
  • 46
tzima
  • 1,285
  • 1
  • 10
  • 23

2 Answers2

16

You already gave most of the answer yourself. Start by pressing ALT+R, N and then simply start typing the name of the configuration you want. The cursor should be positioned in the filter field and thus incrementally reduce the list of launch configurations as you type. When you've narrowed it down to 1, complete the selection by ALT+R.

BTW: thanks for the reminder, I, too, was using the mouse way too much in this particular use case. I will stop doing so, now that I gave the answer :)

jesterjunk
  • 2,342
  • 22
  • 18
Stephan Herrmann
  • 7,963
  • 2
  • 27
  • 38
  • OMG, how could I overlook that search box? Thanks a lot! – tzima Mar 08 '15 at 16:16
  • 4
    To make it even more efficient: http://stackoverflow.com/a/12606868/2709026 (binding a keyboard shortcut for opening Run configurations window). Personally, I chose `ALT+R`. Now it's perfect! `ALT+R`, start typing, `ENTER`. Exactly what I was looking for. – tzima Mar 08 '15 at 17:32
  • 2
    You can also use the keyboard shortcut Ctrl + F11 to launch previously run configuration. – Sudheer Palyam Apr 14 '16 at 09:12
  • I followed the steps above and typed in the name of the configuration. Eclipse finds it but when I press `ALT+r` then "Browse" is selected and not Run. How can I press `ALT+R` instead of `ALT+r` ? `ALT+SHIFT +r ` is not working for me (Eclipse Neon 2) – v.tralala May 08 '17 at 14:42
4

Since Eclipse 4.12 (June 2019, 4 years later) you can also launch any of the Run or Debug configurations available in your workspace from... the Quick Access menu (Ctrl+3 shortcut)

https://www.eclipse.org/eclipse/news/4.12/images/run-debug-quickaccess.png

Note: For performance reasons, the extra Quick Access entries are only visible if the org.eclipse.debug.ui bundle was already activated by some previous action in the workbench such as editing a launch configuration, or expanding the Run As... menus.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250