作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试调试包含大量匿名内部类的 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>
最佳答案
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/
我是一名优秀的程序员,十分优秀!