简体   繁体   中英

Eclipse debug issue with class Java API in rt.jar

I have a problem with Eclipse Debug. First of all, the steps that I performed is the follows:

  • I installed Eclipse Photon
  • I installed the Eclipse Color Theme plugin
  • I updated the settings of formatting
  • I installed the Enhanced Class Decompiler plugin.

I have configured last plugin editing only File Associations setting the Class Decompiler Viewer as Default for file types both .class and .class without source.

Now it happen that if I open a class of Java API as SimpleFormatter in rt.jar, the decompiler show me the source code decompiled (which I know is just representation based on decompiler used, in my case I use JD-Core). However, I can't to apply any breakpoint on this code, So I can't debug this class, which I know it is used. I can't even to put breakpoints on class method. I before could to put breakpoints, but it gave me an error like "Unable to install breakpoint..." when I ran debug.

Specifically, I would like to debug the classes source code in the Java API's jar files, for example, debug the previous class. Do you know how I can do this? Thanks :)

The jars contained in the JRE are compiled without debug info, that means that the debugger doesn't have any information about the line executed. If you want to debug the classes contained in that jar, you have to download the sources and compile it with "-g" option

I have found out that it's a bug which occurs for latest versions of Eclipse. Specifically, a bug among Eclipse and Enanched Class Decompiler. I solved using a previous version of Eclispe.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM