Java不支持调试 [英] debugging is not supporting in java

查看:79
本文介绍了Java不支持调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Java新手.

我已经将反编译插件安装到了eclipse上.我的项目包含一些外部
我已经使用反编译器从一个jar文件中打开了预定义的类之一.将打开其对应的.class文件,并且该.class文件不支持调试.

I have installed the decompiling plugin to the eclipse. My project contains some external
jars like spring mvc jars.I have opened one of the predefined class from one jar file using decompiler. Its corresponding .class file is opened and this .class file does not support debugging.

我该如何调试该类?

推荐答案

我建议先看看调试是如何进行的.

I would suggest to look how the debugging happens first.

  • IDE实际上不执行任何调试.它仅在运行时使用java提供的调试信息.
  • debug模式运行程序时,java在类文件中生成某些附加信息,供运行时使用.在命令提示符下,可以通过调用 -g 选项来执行此操作.例如 javac -g YourClass.java
  • 简而言之,jar文件中的类可能没有调试信息,因为它不是使用调试选项进行编译的.
  • The IDE actually does not do any debugging. Its just uses the debug information provided by java at run time.
  • When you run your program in debug mode, the java generates certain additional information in the class file to be used by the Runtime. On command prompt, you can do this by invoking -g option. e.g. javac -g YourClass.java
  • In short, class from the jar file may not have the debugging information as it was not compiled with debugging option.

因此,为了使您工作,您要做的是重新编译反编译的源并将其用于调试.

So, to get you working, what you do is to re-compile the decompiled source and use that for debugging.

这里与您可以的相关链接参考.

Here is relevant link your can refer to.

这篇关于Java不支持调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆