如何在ECLIPSE中调试.class文件? [英] How to debug .class files in ECLIPSE?

查看:148
本文介绍了如何在ECLIPSE中调试.class文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse 3.5,并将src.zip附加到Eclipse中的全局设置中。
Windows - >首选项 - > Java - >已安装JRE - > rt.jar - 源附件 - ..... / jdk / src.zip


$ b $我很成功地能够进入java核心库的.class文件并查看源代码。我构建一个使用LinkedList的类,并在LinkedList类中设置了一个断点。



当我调试我的源代码(我的项目)中的断点工作良好,但是当我需要进入java核心lib .classes时,我会收到以下错误我的Eclipse



由于缺少行号属性,无法在java.util.LinkedList中安装断点。修改编译器选项以生成行号属性。



我在首选项中检查了我的编辑器设置,并发现所有选项都为真。

如果有人可以帮我解决这个问题



提前感谢

解决方案

您可能有编译器设置为在您的类文件中包含调试信息,但是rt.jar中的类文件没有以这种方式编译。您需要重新编译rt.jar中所有的类的源代码(不是对于微弱的内容),或下载jdk的调试版本


I am using Eclipse 3.5 and I attached the src.zip to my global settings in Eclipse. Windows--> Preferences -->Java -->Installed JREs -->rt.jar - Source attachment - ...../jdk/src.zip

I am successfully able to step in the java core library .class files and view the source code. I building a Class which uses the LinkedList and I have set a breakpoint inside the LinkedList class.

When I debug the breakpoints in my source code (my projects) are working good but when I need to step into the java core lib .classes I get the following error in my Eclipse

Unable to install breakpoint in java.util.LinkedList due to missing line Number attributes. Modify complier options to generate line number attributes.

I checked my complier settings in Preferences and found all options checked true. It would to great if someone can help me resolve this issue.

Thanks in advance.

解决方案

You may have the compiler set to include debugging information in YOUR class files, but the class files in rt.jar weren't compiled that way. You need to either recompile all the source for the classes in rt.jar (not for the faint of heart), or download a debug build of the jdk.

这篇关于如何在ECLIPSE中调试.class文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆