使用DEBUG的方式进行调试
Eclipse版本4.7.2(随便找了个最新版本)如下图:
Eclipse启动截图
1、菜单栏 Help -> Eclipse Marketplace ... -> Find 键入【decompiler】点击搜索
搜索结果图
安装上图红框Enhanced Class Decompiler 3.0.0
安装完成图
2、调整Class文件默认编辑器 Window -> Preferences -> General -> Editors -> File Associations
选择 *.class -> Associated editors -> 类反编译查看器 -> Default
Class文件设置
选择 *.class without source -> Associated editors -> 类反编译查看器 -> Default
Class without source文件设置
-> Apply and close
3、调整反编译器参数 Window -> Preferences -> Java -> 反编译器 -> Apply 按下图配置
反编译器配置
4、DEBUG测试,测试代码如下:
测试代码
点击Ctrl+鼠标左键 指向String 可进入下图,在构造函数打breakpoint
断点位置
DEBUG启动Main方法
断点已经成功打上