gpt4 book ai didi

eclipse - 如何在 Eclipse 中创建默认调试和运行配置?

转载 作者:行者123 更新时间:2023-12-03 05:49:34 26 4
gpt4 key购买 nike

每当我在 Eclipse 中点击“调试”或“运行”时,都会出现一个对话框,询问我要使用什么配置。

如何设置默认配置并绑定(bind)键盘快捷键?

最佳答案

也许this article from Eclipse One Tips将帮助您:

How to run the last launched application

The answer lies in a preference hidden on the Run/Debug page:

  • Go to Window > Preferences > Run/Debug > Launching.
  • Select the option Always launch the previously launched application. It’s located at the bottom of the dialog.

The preference should look something like this:

Launch previously launched prefrences Now you’re free to press F11, Ctrl+F11 or click the Run/Debug icons on the toolbar with confidence, knowing it’s going to run what you expect it to run.

One question arises: How do you quickly run a class as a specific application (eg. a JUnit test) if you can’t press F11 to run it? You have some options available:

  • The fastest way is to use keyboard shortcuts. Eclipse allows you to launch classes using a keystroke, including JUnit tests, Java applications, etc using Alt+Shift+X.
  • Alternatively, right-click on the class and select Run As. The submenu will show available options for launching the class.
  • Lastly, you could click the pulldown arrow on the run/debug icons in the toolbar and select Run As. The submenu once again shows available options for launching the class.

关于eclipse - 如何在 Eclipse 中创建默认调试和运行配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2078733/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com