Find Usages does not work with Libraries

已回答

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?

0
Avatar
Permanently deleted user

This approach seems to mess up debug capability.  When debugging libraries lines no longer match and breakpoints are not hit properly.  Suggestions?

0

IDEA-137736.

You can make source lines match again by recompiling a library from produced sources.

0
Avatar
Permanently deleted user

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.

0
Avatar
Permanently deleted user

Does decompiler.use.line.mapping have anything to do with Intellij's ability to map decompiled code to the debugger?

0

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).

0
Avatar
Permanently deleted user

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.

0

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.

0
Avatar
Permanently deleted user

Any ETA on that?  Eclipse has had this functionality I believe for several years.

0

No ETA, sorry.

Are you sure about Eclipse? According to this question, it doesn't.

0
Avatar
Permanently deleted user

I am certain - the functionality is facilitated through the jd eclipse plugin (which is on Github).  Try it out.

0

请先登录再写评论。