How to debug .class files in ECLIPSE?

前端 未结 3 1806
南方客
南方客 2020-12-06 13:32

I am using Eclipse 3.5 and I attached the src.zip to my global settings in Eclipse. Windows--> Preferences -->Java -->Installed JREs -->rt.jar - Source attachment - ...../j

3条回答
  •  余生分开走
    2020-12-06 13:50

    You should not use a JRE with a JDR src attached as the JRE classes are not well suited for debugging.

    Let Eclipse search for Java environments and then select the JDK from the resulting list. This Java environment will have the src.zip attached correctly and you should be able to investigate.

    Note that even JDK classes do not have full debugging information available, so you cannot see local variables etc.

    (Also, the Compiler settings panel only applies to your code. The JRE classes are pregenerated and the panel does not influence them).

提交回复
热议问题