-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decompiler does not work with JARs within Eclipse Debugger #16
Comments
It sounds like there are two issues here:
General: What version of JD-Eclipse realign are you using? What version of Eclipse?
On 10 Dec 2012, at 22:13, kwin [email protected] wrote:
|
You can see an example at https://github.com/digital-wonderland/jdeclipse-issue-16 (note that the cq-mailer jar has to be downloaded manually from the adobe repository (or that one added as repo). After that please set a breakpoint within the CqMailingService constructor and start debugging the App class. When the breakpoint is reached neither the source is shown nor does the 'Expressions' view work within the 'Debug' perspective. Now use JD-Gui to decompile the jar (open jar and select File->'Save all Sources'), associate the created src.zip manually with the cq-mailer .jar within Eclipse and restart debugging the App class. Now the source is correctly shown and also the 'Expressions' view works. Our expectation / hope is that jdeclipse would automatically decompile the class so everything 'magically' works and one doesn't have to attach the source manually. |
Just as an addition: We use the latest version of JD-Eclipse Realign (1.1.1) in Eclipse 4.2 SR1 under Mac OS 10.8. Another remark about the demo application attached above: It works fine, if you rely on a maven dependency where the source is available as well (JAR with source attachment), so I assume, this really is a problem with JD-Eclipse and not with m2e. |
I also hava the problem; source not found , I add external archive class jar in source ; source will flash but finally " source not found " again , jd eclipse can not decomile the class in this situation |
do you notice that the 'source not found' problem is because the class file not associated with a jar file!juset because this jar file is loaded dynamic(e.g. Maven) so: Use run-jetty-run Maven plugin if you are working with J2EE,it is recommend to use the run-jetty-run and the DECVM technique,enjoy it |
Did anyone get this resolved.. I can get it to work on a straight java app.. but as soon as I run via jboss and put in a breakpoint.. the debugger flashes the decompiled code and then closes going back to Source not found |
As a temporary solution what I did was copying decompiled source of classes from Eclipse, saving them in a folder (with complete package paths), then added that folder in the Source Lookup. If there are not too many classes to save it works for now. It shows the source code during the debugging and sets active green line when stepping through. Evaluating expressions as well as Inspecting variables doesn't work. It's Eclipse restriction. Suppose it's because decompiled source doesn't match the original source code for a class (at least all theese decompiler comments makes the whole code text different). What works is hovering over a variable to see its content, though for expressions or method chains it fails). |
Hi All, While working on any version of eclipse, add the required jars directly to your build path, not through any libraries....for me I have tried this on Eclipse Galileo as well as Eclipse Neon. I have deployed my application in tomcat, and added all the jars from WEB-INF/lib and .properties files from WEB-INF/classes directly to build path and removed the existing Web App library that takes the contents of lib/classes to the build path. If you work like this you will be able to debug inside jar files. Inside Jar files, you will not be able to check values of any local method variable or evaluate any expression manually, but you will be able to check any global variable (both class as well as member) value as well as arguments passed to the current method. |
When I set a breakpoint within a JAR of a Maven dependency of a project and afterwards debug that project, the debugger will not show the decompiled source of the Maven dependency when stepping through the code. Also I cannot I cannot evaluate new expressions.
I don't know though, whether this problem can be fixed in jdeclipse-realign, or whether it is the problem in m2e described here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=384065.
The text was updated successfully, but these errors were encountered: