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

发布于 2024-09-29 12:22:10 字数 77 浏览 1 评论 0原文

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

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

对风讲故事 2024-10-06 12:22:10

启动配置有问题。可能正在引用一个已关闭的项目(这对我来说就是这样)...

因此启动可能会起作用(在我的情况下,这是因为该项目实际上并不需要),但任何类似的问题都会导致它无法启动被添加到启动列表中。要找出原因,您可以

  1. 尝试运行启动文件
  2. 在“调试”视图(不是透视图,而是视图 ie 选项卡)中,右键单击启动并选择“编辑 <启动名称>...”。该属性窗口将显示任何错误。一旦这些问题被修复,它将把启动添加到运行配置列表中。

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 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.
木緿 2024-10-06 12:22:10

您还可以取消选中“过滤已关闭项目中的配置”和“过滤已删除或丢失项目中的配置”选项。这应该可以解决问题。

< /a>

You can also uncheck the options "Filter configurations in closed project" and "Filter configurations in deleted or missing projects". This should do the trick.

并安 2024-10-06 12:22:10

输入图片描述此处尝试从过滤首选项中删除过滤器

enter image description hereTry to remove filter from filtering preferences

好多鱼好多余 2024-10-06 12:22:10

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

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".

烧了回忆取暖 2024-10-06 12:22:10

对我来说,发生这种情况是因为复制相同的项目并给出其他名称,因此我的项目名称没有显示在启动配置中(由于没有显示在启动配置中,可能还有其他一些原因。)

修复:

  • 右键单击该项目,选择“Coverage”,之后将得到两个
    选项java应用程序和配置。

  • 选择 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.

  • select java application it will run the project and create the
    coverage.

  • Other option is just run the Application it will create the coverage.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文