Eclipse 中是否有重新运行最近启动的程序的快捷方式?
我对 Eclipse 做的最常见的事情之一就是重新运行最后一个程序.我通过 Run -> Run History -> [top most item] 来做到这一点.
One of the most frequent thing I do with Eclipse is to re-run the last program. I do it by going to Run -> Run History -> [top most item].
有快捷键吗?
我知道 CTRL + F11 但这对我不起作用.仅当当前活动的类(我正在编辑其源代码的类)没有 main 方法时,它才会启动最新的程序.如果是这样,它将使用此类作为程序的入口点,而不是 Run History 列表中的入口点.
I know of CTRL + F11 but this does not work for me. It will launch the most recent program only if the currently active class (the class whose source code I am editing) does not have a main method. If it does it will use this class as the entry point for the program and not the one from the Run History list.
推荐答案
要让 CTRL+F11 以你想要的方式工作,你必须设置(从Windows/首选项")
"Run/debug > Launching : Launch Operation
" 设置为:
For CTRL+F11 to work the way you want, you must set (from "Windows/Preferences") the
"Run/debug > Launching : Launch Operation
" setting to:
始终启动之前启动的应用程序
Always launch the previously launched application
<小时>
正如 Thorbjørn Ravn Andersen 在评论中提到的那样,启动最后一个应用程序曾经是(3.2 或之前)默认行为.
由于 3.3M6(2007 年 3 月),如 这个帖子:
As Thorbjørn Ravn Andersen mentions in the comment, launching the last app used to be (3.2 or before) the default behavior.
Since 3.3M6 (March 2007), As illustrated by this thread:
默认情况下,运行和调试应用程序已被简化为运行或调试所选文件或活动编辑器.
当所选资源(或活动编辑器)不可执行时,用户可以选择启动相关项目或重新启动之前的启动.
By default, running and debugging applications has been simplified to run or debug the selected file or active editor.
When the selected resource (or active editor) is not executable, users can opt to launch the associated project or re-launch the previous launch.
这些设置在 Run/Debug >正在启动
首选项页面.
用户还可以恢复为始终启动前一个应用程序的 3.2 行为.
These settings are managed on the Run/Debug > Launching
preference page.
Users can also revert to the 3.2 behavior of always launching the previous application.
<小时>
Torsten 确认 在评论中:
按 F11 只会在调试模式下启动最后一个应用程序.
Pressing F11 only launches the last application in debug mode.
相关文章