Find Usages does not work with Libraries
Answered
I have a number of libraries where I would like to search for usages but do not have the source attached. Is it possible for find usages to search for elements if there is no source?
Please sign in to leave a comment.
Already answered here.
This approach seems to mess up debug capability. When debugging libraries lines no longer match and breakpoints are not hit properly. Suggestions?
IDEA-137736.
You can make source lines match again by recompiling a library from produced sources.
Decompiling all classes and recompiling the libraries from the decompiled classes is not an option. Why is it that I can properly step through lines of code when decompiling within IntelliJ but not when using the command line utility? Do I need to run the command line utility with certain parameters in order to generate the appropriate source code so that I can get proper line matching with the debugger? If so, could you please provide the exact command that should be run.
Does decompiler.use.line.mapping have anything to do with Intellij's ability to map decompiled code to the debugger?
Unfortunately, it's the only option available at the moment :(
When invoked from the IDE, the decompiler produces an (in-memory) mapping table which the debugger is then able to use. `decompiler.use.line.mapping` is the option which enables the mapping (it is `true` by default; setting it to `false` will).
Could we add an option to the command line decompiler so that files are decompiled with their correct line mappings? E.g. if there is a lot of empty space then just decompile the file to this so that the lines do match - unless a better solution is available that could be implemented relatively easily.
We tried - in a best case, the code was unreadable, and sometimes it was just impossible.
I do believe IDEA-137736 is more promising here. After all, not all code could be decompiled to a sane Java.
Any ETA on that? Eclipse has had this functionality I believe for several years.
No ETA, sorry.
Are you sure about Eclipse? According to this question, it doesn't.
I am certain - the functionality is facilitated through the jd eclipse plugin (which is on Github). Try it out.