gpt4 book ai didi

java - Eclipse - 无法在内部类上安装断点

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:26:39 29 4
gpt4 key购买 nike

我正在尝试调试包含大量匿名内部类的 Java 程序。每当我在 Eclipse 的 Debug模式下启动程序时,我都会收到以下消息:

Unable to install breakpoint in my.own.code.SomeClass1$$FastClassByGuice$$21bac442
Unable to install breakpoint in my.own.code.SomeClass2$$FastClassByGuice$$7880adb3
Unable to install breakpoint in my.own.code.SomeClass2$$FastClassByGuice$$7880adb3
Unable to install breakpoint in my.own.code.SomeClass3$$FastClassByGuice$$9ac6f2a1
Unable to install breakpoint in my.own.code.SomeClass4$$FastClassByGuice$$8ae07d4b
Unable to install breakpoint in my.own.code.SomeClass4$$FastClassByGuice$$9ac6f2a1
Unable to install breakpoint in my.own.code.SomeClass5$$FastClassByGuice$$2ef92190
Unable to install breakpoint in my.own.code.SomeClass6$$FastClassByGuice$$c98d2633

对于我的一个匿名内部类中的每个断点,我都会收到一条与上述类似的消息。我该如何解决?我需要调试我的匿名内部类。

一些额外信息:我的程序由一个大型 Maven 项目中的 4 个 Maven 模块组成。我使用 Oracle 的 jdk1.7 以相同的方式编译它们。可以肯定的是,我将以下内容添加到我所有模块的 pom.xml 中,但没有任何运气:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<debug>true</debug>
</configuration>
</plugin>
</plugins>
</build>

我也看过(123),但我的 eclipse 设置没问题。

最佳答案

Guice 使用字节码生成 AOP (面向方面​​的编程)、更快的反射和代理循环依赖。

自 Guice 2.0 版以来,AOP is optional .例如,您可以使用 2.0-no_aop:

<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>2.0-no_aop</version>
</dependency>

关于java - Eclipse - 无法在内部类上安装断点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20374977/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com