There is currently no way to bind to a specific launch configuration (without writing the plugin code yourself). Here's an example of going into a launch configuration by looking for a named one:
public class LaunchRunAwayHandler extends AbstractHandler { @Override public Object execute(ExecutionEvent event) throws ExecutionException { try { final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); ILaunchConfiguration toLaunch = null; for (ILaunchConfiguration config :launchManager.getLaunchConfigurations()) { System.out.println(config.getName()); if (config.getName().equals("RunAway")) { toLaunch = config; } } DebugUITools.launch(toLaunch, ILaunchManager.RUN_MODE); } catch (CoreException e) { throw new ExecutionException("Failed to launch", e); } return null; } }
In theory, you should write a command that provides an option to select a name, and defines org.eclipse.core.commands.IParameterValues so you can see all of your startup configurations on the Keys preferences page.
F11 - Debug Last Launched and CTRL+F11 starts from the last run. You may need to set the preference in Settings> Launch / Debug> Launch to "Always run previously launched application." But this will just launch the latter, and not switch between launches.
Paul webster
source share