简体   繁体   English

为什么我的 Eclipse 启动配置没有添加到运行或调试配置列表中?

[英]Why is my Eclipse launch configuration not being added to the Run or Debug configurations list?

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.我有一个 .launch 文件,我可以通过上下文菜单(运行方式...)运行它,但它没有像它应该的那样被添加到调试或运行配置列表中。 Why not?为什么不呢?

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要找出原因是什么,您可以

  1. Try running the launch file尝试运行启动文件
  2. In the "Debug" view (not perspective, but view ie tab), right click the launch and select "Edit <launch name>...".在“调试”视图(不是透视图,而是视图 ie 选项卡)中,右键单击启动并选择“编辑 <启动名称>...”。 This properties window will show you any errors.此属性窗口将显示任何错误。 Once those are fixed, it will add the launch to the list of run configs.一旦这些被修复,它就会将启动添加到运行配置列表中。

You can also uncheck the options "Filter configurations in closed project" and "Filter configurations in deleted or missing projects".您还可以取消选中“已关闭项目中的过滤配置”和“已删除或丢失的项目中的过滤配置”选项。 This should do the trick.这应该可以解决问题。

在此处输入图片说明 Try to remove filter from filtering preferences尝试从过滤首选项中删除过滤器

这可能有任何帮助,但我认为在导入项目时,它会被添加到“运行配置”的常规列表中,但是当我添加一个 java 运行配置时,它会被添加到 Eclipse“运行”中的“Java 应用程序”父节点配置”。

For me, this happens due to copy the same project and giving the other name so my project name is not showing in the launch configuration (for not showing in the launch configuration there could be some other reasons.)对我来说,发生这种情况是因为复制了同一个项目并给出了另一个名称,所以我的项目名称没有显示在启动配置中(因为没有显示在启动配置中,可能有其他一些原因。)

Fix:修复:

  • Right-click on the project select Coverage as after this will get two option java application and configuration.右键单击项目选择 Coverage 之后将获得两个选项 java application 和 configuration。

  • select java application it will run the project and create the coverage.选择 java 应用程序,它将运行项目并创建覆盖范围。

  • Other option is just run the Application it will create the coverage.其他选项只是运行将创建覆盖范围的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Eclipse中IntelliJ IDEA的“启动前:”运行/调试配置功能等同于什么? - What's the equivalent of IntelliJ IDEA's Run/Debug Configurations “Before launch:” feature in Eclipse? Eclipse运行配置-单一配置中的多个运行配置? - Eclipse Run Configuration - Multiple Run configurations in single configuration? Eclipse为什么不记得我的启动配置? - Why won't Eclipse remember my launch configuration? Eclipse 中“启动配置”中的错误 - Error in 'Launch Configurations' in Eclipse Eclipse中的Maven启动配置 - Maven launch configurations in Eclipse (Eclipse)启动配置只能以一种模式存在吗? 运行还是调试? - (Eclipse) Can a Launch configuration exist only in one mode? Either Run or Debug? CXF客户端配置:为什么未将WSA元素添加到我的请求中? - CXF Client Configuration: Why are the WSA Elements not being added to my request? Eclipse 运行配置:如何添加已添加到 Classpath 的项目的 Maven 依赖项 - Eclipse Run Configurations: how to add Maven dependencies of projects added to Classpath 在Eclipse启动配置中更改默认的“Program to Run” - Change default “Program to Run” in Eclipse launch configuration eclipse运行配置中的“具有此名称的配置已存在”错误 - “A configuration with this name already exists” error in eclipse run configurations
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM