Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse "Enhanced Class Decompiler" plugin does not decompile when debugging

Problem description: Decompile works fine when viewing a class (i.e. Ctrl+Shift+T), but not when stepping into code from the debugging perspective - instead the "Class File Viewer" is opened. Version Used: Eclipse Oxygen and Enhanced Class Decompiler 3.0.0

like image 907
panschk Avatar asked Jan 23 '18 07:01

panschk


People also ask

How do I use Eclipse enhanced class decompiler?

In Eclipse IDE, we can use Enhanced Class Decompiler plugin to decompile Java class files without source code directly. After installing and configuring the Enhanced Class Decompiler plugin, click on the class or methods, press F3 , and the plugin will automatically decompile the Java class.

How do I debug a .class file in eclipse?

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.

How can I view the source code of a class file in eclipse?

Go to the Package Explorer view with the file open in the current editor. Click the "Link with Editor" toggle (the two arrows). This should jump you to the class file you are viewing, which should be in the jar you are using. If the jar is in a library, you should see the path to the jar in the package explorer.


1 Answers

This will work on oxygen and later version as well:

Click on "Window > Preferences > General > Editors > File Associations"

Change default to your for both .class association.

"*.class" : "Class Decompiler Viewer" is selected by default.

"*.class without source" : "Class Decompiler Viewer" is selected by default.

enter image description here

like image 183
Sayantan Mandal Avatar answered Oct 06 '22 01:10

Sayantan Mandal