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

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

问题描述

我使用Eclipse 3.5和我附加src.zip到我的全局设置在Eclipse。
Windows - > Preferences - > Java - > Installed JREs - > rt.jar - Source attachment - ..... / jdk / src.zip

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

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

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.

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

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

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

我在首选项中检查了我的编译器设置,发现所有选项都选中true。

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

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.

提前感谢。

推荐答案

设置为在YOUR类文件中包括调试信息,但rt.jar中的类文件不是这样编译的。您需要重新编译rt.jar中的所有类的源代码(而不是模糊的),或下载调试版本的jdk

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天全站免登陆