且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否有用于在Eclipse中停止当前控制台的键盘快捷方式?

更新时间:2023-01-31 10:57:42

转到首选项 - >常规 - >键



查找终止将绑定设置为任何您想要的。



然后将调试更改为编辑Java源。


I'm developping a Java application with a class containing main. I can start the application using Ctrl+Alt+X J subsequently the application can be re-run by hitting Alt+R T Enter to choose the menu option for the first item in the Run history.

But to stop the application, I have to click on the small red square in the console view. This is annoying, because it forces me to use the mouse, type Alt+R T Enter then re-focus the editor using the mouse again.

Eclipse being so configurable, there must be a keyboard shortcut to stop the application run in the current console I haven't found. There are an entry in Window > Preferences > Keys called Terminate and Terminate and Relaunch but no matter what binding I assign or what when conditions I set and no matter if I use the Debug perspective or not, they don't seem to fire.

Please help an Eclipse newbie avoiding the mouse :)

Go to Preferences -> General -> Keys

Find "Terminate" Set your binding to whatever you want.

Then change "When" from "Debugging" to "Editing Java Source".