如何在eclipse中创建默认调试和运行配置? [英] How to create default debug and run configuration in eclipse?

查看:472
本文介绍了如何在eclipse中创建默认调试和运行配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我打开Debug或Run,我会收到一个对话框,询问我要使用什么配置。如何设置默认配置并绑定键盘快捷方式?

Whenever I hit Debug or Run, I get a dialog asking me what configuration I want to use. How do I set a default configuration and bind a keyboard shortcut?

推荐答案

也许

Maybe this will help you:

如何运行上次启动的
应用程序答案在于
首选项隐藏在运行/调试
页面:转到窗口首选项>
运行/调试启动。选择
选项始终启动以前的
启动的应用程序。它位于
对话框的底部。
首选项应该像
这样:

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:

现在你可以自由地按 F11
Ctrl + F11 或点击工具栏上的运行/调试图标

知道它将运行您的
希望它运行。
出现一个问题:

如果您不能按,您如何快速运行类作为
特定应用程序(例如,JUnit
测试) F11
运行
它?您有一些选项可用:
最快的方法是使用键盘
快捷方式。 Eclipse允许您使用键盘
启动类,
包括JUnit测试,Java
应用程序等使用 Alt + Shift + < KBD> X 。
或者,右键单击
类并选择运行方式。子菜单
将显示
启动该类的可用选项。最后,您可以
单击工具栏上
运行/调试图标上的下拉箭头,
选择运行方式。子菜单再次
显示了启动
该类的可用选项。

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中创建默认调试和运行配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆