我们如何调试Jar文件中的文件 [英] How can we debug a file which is inside Jar file
问题描述
我有一个现有的Application,其中的一些代码在JAr文件中的
中。
请告诉我如何调试Jar文件中的文件??
I have a existing Application , in which some of the code is present inside JAr file . Please tell me how can we debug a file which is inside Jar file ??
我使用了JD-GUI,打开了该jar并保存了所有源代码
在我的硬盘中,并将此源附加到Eclipse的类文件中。
并且当我尝试在该类文件中放置断点时,调试器不会在那里停止。
I have used JD-GUI , opened that jar and saved all the source inside my harddisk and attaached this source to the class file from Eclipse . And When i tried to put breakpoints to that class file , the debugger doesn't stop there .
请告诉我如何处理这种情况?
Please tell me how to deal with this situation ??
推荐答案
您可以尝试以下方法:
首先打开jar文件使用JD(Java Decompiler),然后单击文件->保存JAR源,它将成为包含Java源文件的.zip文件。然后,您可以使用添加源在调试配置中添加此源zip文件。
First open the jar file using JD(Java Decompiler), then click on File -> Save JAR Sources and it will become a .zip file containing the java source files. Then you can add this source zip file in the debug configuration using add source. It will work then for sure.
我有时在调试jar文件类时也会遇到类似的问题。但是在完成上述步骤后,问题就解决了。
I also faced the similar issue,sometime while debugging the jar file classes. But after the above procedure the issue got resolved.
谢谢
这篇关于我们如何调试Jar文件中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!