Java 为什么我的 Eclipse 启动配置没有添加到运行或调试配置列表中?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4049920/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why is my Eclipse launch configuration not being added to the Run or Debug configurations list?
提问by Epaga
I have a .launch file which I can run by context menu (Run As...), but it is not being added to the list of Debug or Run configurations like it should. Why not?
我有一个 .launch 文件,我可以通过上下文菜单(运行方式...)运行它,但它没有像它应该的那样被添加到调试或运行配置列表中。为什么不?
采纳答案by Epaga
There is something wrong with the launch config. Possibly a project is being referenced which is closed (that's what it was for me)...
启动配置有问题。可能正在引用一个已关闭的项目(这对我来说就是这样)......
So the launch may work (in my case this was because the project wasn't actually required) but any issues like this will cause it not to be added to the list of launches. To figure out what the cause is, you can
所以启动可能会起作用(在我的情况下,这是因为该项目实际上并不是必需的)但是任何类似的问题都会导致它不会被添加到启动列表中。要找出原因是什么,您可以
- Try running the launch file
- In the "Debug" view (not perspective, but view i.e. tab), right click the launch and select "Edit <launch name>...". This properties window will show you any errors. Once those are fixed, it will add the launch to the list of run configs.
- 尝试运行启动文件
- 在“调试”视图(不是透视图,而是视图 ie 选项卡)中,右键单击启动并选择“编辑 <启动名称>...”。此属性窗口将显示任何错误。一旦这些被修复,它就会将启动添加到运行配置列表中。
回答by blue-sky
This may be any help at all but I assumed that when importing a project it would be added to general list of "Run Configurations", but as I added a java run config it is added to "Java Application" parent node in Eclipse "Run Configurations".
这可能有任何帮助,但我认为在导入项目时,它会被添加到“运行配置”的常规列表中,但是当我添加一个 java 运行配置时,它会被添加到 Eclipse“运行”中的“Java 应用程序”父节点配置”。