java反编译器在实际物理位置保存行号
许多 IDE 的调试器与物理行号相匹配。 我正在寻找 java 反编译器,在反编译代码中保存实际行号。
Many IDE's debugger match the physical line number.
I'm looking for java decompiler with saving actual line number in decompiling code.
http://java.decompiler.free.fr/ is not one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我已经发布了 JD Eclipse 的配套插件,它修复了行号问题,并且可以更轻松地在真实源代码和反编译源代码之间切换: http://mchr3k-coding.blogspot.co.uk/2012/07/realignment-for-jd-eclipse.html
I have released a companion plugin to JD Eclipse which fixes the line numbers issue and makes it easier to switch between real and decompiled source: http://mchr3k-coding.blogspot.co.uk/2012/07/realignment-for-jd-eclipse.html
我实际上在 JD-Eclipse 中添加了“对齐代码以进行调试”功能。我去年一直在使用它。
如果有人想在 Emmanuel Dupuy 发布自己的版本之前尝试一下,您可以从 此处。 README.txt 中有更多详细信息
I actually added an "Align code for debugging" feature to JD-Eclipse. I've been using it for the last year.
If anyone wants to give it a try until Emmanuel Dupuy releases his own version, you can get it from here. More details inside README.txt
您是否尝试过 JadClipse
Have you tried JadClipse
我已经尝试了所有我所知道的 Eclipse 反编译器,但我还没有看到一个能够将原始行号与其显示的源代码对齐的反编译器。您引用的 JD-Eclipse 插件与原始行号的注释最接近。太糟糕了,它没有修改生成的源代码来将它们排列起来。一般来说,最好的办法是追踪原始源代码并附加到 Eclipse。否则,您只需使用 JD-Eclipse 寻找注释中的行号即可。
I've tried all of the decompilers I'm aware of for Eclipse and I've yet to see one that lines up the original line numbers with the source it shows. The JD-Eclipse plugin you referenced comes the closest with comments for the original line numbers. It's too bad it doesn't munge the generated source to line them up. Generally the best thing to do is track down the original source to attach to Eclipse. Otherwise you just have to hunt for the line number in the comments with JD-Eclipse.
您可能还想看看这个:
https://github.com/shimonmagal/ jdgui-source-line-fixer
它从 jd-gui 获取 zip 并输出不同的 zip,并固定行号。
也许不是最方便的,但可以完成工作。
You might want to look at this, as well:
https://github.com/shimonmagal/jdgui-source-line-fixer
It takes in the zip from jd-gui and outputs a different zip, with line numbers fixed.
Not the most convenient maybe, but does the job.