Use Command-R in Eclipse to Run (like Xcode)

Switching between iOS and Android SDKs has always annoys me with the different key bindings. I poked around and here’s how you can set up Command-R to “run” with debug mode just like Xcode:

  1. Set up your run configuration in Eclipse as you normally would.
  2. Configure the run menu to always use the last app:
    • Window -> Preferences -> Run/Debug -> Launching
    • Look in ‘Launch Operation’ at the bottom and select ‘Always launch the previously launched application’.
    • Bonus: select ‘always’ at the top under ‘Save required dirty editors before launching’.
  3. Configure your key command:
    • Window -> General -> Keys
    • Search for ‘Debug Last Launched’ in the filter
    • Change the key binding to Command-R

Voila. Command-R now does the same as Xcode.