Locally declared variables can not be inspected

前端 未结 4 1737
借酒劲吻你
借酒劲吻你 2020-11-27 12:52

Sometimes when I am debugging code in Eclipse it happens that although I can see and inspect class member variables without any difficulty I am unable to inspect the values

4条回答
  •  渐次进展
    2020-11-27 13:19

    Apparently, the answer is:

    the rt.jar that ships with the JDK (where the core Java classes live) is not compiled with full debug information included in the .class files, so the debugger does not have local variable info.

    Unfortunately, this is not something that Eclipse can do anything about - all debuggers will have the same problem with JDK core classes.

    The release notes of Eclipse 3.4 states:

    Missing debug attributes
    The debugger requires that class files be compiled with debug attributes if it is to be able to display line numbers and local variables. Quite often, class libraries (for example, "rt.jar") are compiled without complete debug attributes, and thus local variables and method arguments for those classes are not visible in the debugger.

提交回复
热议问题