What is the shortcut in eclipse to terminate debugging/running? Looking under Preferences -> Keys says Ctrl + F2 but it doesn\'t work.
Have a debug view open on your perspective (Alt+Shift+Q, Q -> find Debug). Once your application is running, use CTRL+F7 (Command+F7 on mac) to switch to Debug view, press down to highlight the launched app, and trigger your terminate shortcut
Referring to this answer, I don't think it works all the time because depending on what was run, eclipse might not register the 'terminate' command as available.
For example when I run my project using maven (m2e plugin), the terminate button on console view is available, but not on the menu. See screenshot below (I used Springsource Tools Suite 2.9.2 which is based on eclipse indigo, and m2e 1.0.200)
This is because the launched application is not selected by default on the debug view.
This problem is discussed on eclipse forum thread here.
In the Window Tab, you can see the shortcuts :
A lot of the above answers work for some people but maybe not everyone. As Scott Biggs mentioned, command-F2 may not work on macs (note that to get F2 on a mac, you also need to hold down the fn key), so you can reset the binding to shift-F2. Worked for me, as long as you are debugging.
F2 could be already used by your Operating System, which can intercept the keystroke before Eclipse gets a chance.
On macs, the F2 key is often used to increase the screen brightness. This will take precedence over anything that Eclipse will assign it. Translation: when you hit F2 on some macs (depending on your settings), your screen will (try to) brighten, and Eclipse will do nothing.
Hope that helps.
Read all these, but found no simple way. So, I threw together a very simple plugin.
Hope it helps someone else as well.
Go to Preferences -> General -> Keys
Find "Terminate" Set your binding to whatever you want (in my case F12).
Then change "When" from "Debugging" to "Editing Java Source".
Works for me, now.
Going to Customize Perspective only showed me the bindings I already had, not let me set them.