首页 > 解决方案 > 无法安装断点 - Wildfly 远程调试/Eclipse

问题描述

尝试使用 Eclipse 远程调试 Wildfly (9.0.1) WAR Web 应用程序时突然出错。

Unable to install breakpoint in com.yadayada.rest.PageService$Proxy$_$$_WeldClientProxy due to missing line number attributes.  Modify compiler options to generate line number attributes.

我已确保在 Eclipse 属性中检查了“添加变量属性”、“添加行号”、“添加源文件名”选项。(注意基于其他几个类似的 StackOverflow 帖子,我已取消选中这些,应用更改,重建应用程序,离开 eclipse,回来,重新检查它们,重建)。

我分解了我的 WAR 并在一个类文件(特别是我正在尝试调试的那个)上做了一个 javap -l,这向我展示了我所有方法的 LineNumberTable 和 LocalVariableTable,所以我觉得行号被包括在内。

似乎能够调试好,但我对错误感到困惑。

我进行调试的过程:

1. I have a break point set in my code.
2. I have Wildfly started with the debug option (sh standalone.sh --debug)
3. I have a Remote Java Application defined in Eclipse and start debugging by clicking DEBUG on the debug configuration.

一些可能有用的信息L

1. MacOS 10.14.15; Wildfly 9.0.1; Eclipse Photon 4.8.0 build 20180619-1200; Maven 3.3.3
2. To build my WAR, I am using:  mvn clean package -Dmaven.test.skip=true

标签: javaeclipsedebuggingwildfly

解决方案


你是如何在 MacOS 中为 Eclipse 添加行号属性的?我找不到办法。


推荐阅读