使用Eclipse跟踪JDK代码执行流程

使用Eclipse跟踪JDK代码执行流程


English Title:Use Eclipse dogs JDK code carries out flow
现在Eclipse的调试功能相当的强大,Breakpoint,Step Over & Step Into相结合就可以很方便地跟踪代码的执行流程,但有时候要跟踪JDK提供的类的时,却会遇到两个问题: ??? 1、JDK自带的src.zip里源代码并不完整,不能查看相关类的源文件(当然,喜欢的话可以反编译)。譬如,以sun.开头的包就不包含在src.zip这个压缩包中。 ??? 解决办法:下载完整的源文件包,调试时附加给Debugger 即可。 ???? 2、默认的 rt.jar没有行号信息,虽然有源代码,但是不能设置断点。 ?? 解决办法:下载Debug版的JDK,安装以后将其设置为Eclipse的默认JVM即可。 ?? JDK源文件很多,类之间关系相当复杂,跟踪过程中往往会迷失在源码的汪洋大海中,这时,设计模式的知识会派上用场,另外,跟踪Java执行的五种方式 也是一份很好的参考。
==========English==========
Now of Eclipse those who debug a function to comparative is powerful, breakpoint, step Over&Union of Step Into photograph is OK very dog conveniently the executive flow of code, but want what JDK offers to dog occasionally kind when, can encounter two problems however: ? ? ? 1, the source code in the Src.zip that JDK takes oneself is not whole, cannot examine relevant kind source file (of course, if liking, can compile instead) . For example, with Sun. The bag of begin is not included in Src.zip this compresses a bag in. ? ? ? Settle way: Download whole source file package, when debugging, add Debugger can. ? ? ? ? 2, acquiescent Rt.jar does not have firm information, although have source code, but cannot install breakpoint. ? ? Settle way: Download the JDK of Debug edition, the acquiescent JVM that its the setting is Eclipse after installation can. ? ? JDK source file is very much, kind between the relation is quite complex, dog in the boundless ocean that often can be lost in the source in the process, at this moment, the knowledge that designs pattern is met the use on the clique, additional, dog 5 kinds of means that Java carries out also are a very good reference.
==========回复|reply==========

==========English==========

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值