4 ms·
If you are using Java with a package/build manager like maven you can always automatically pull all the source jars and then any IDE (Intellij/Eclipse) will all
by arturnt 12y ago
If you are using Java with a package/build manager like maven you can always automatically pull all the source jars and then any IDE (Intellij/Eclipse) will allow you to jump through all third party libraries. Are you targeting the non-IDE crowd with this tool?
- jlebowskii 12y agoThe main use-case that I see for this is when an exception is thrown in production on some random server inside a third party library. Such exceptions can be excruciatingly hard to run down without the source code.
- sudowhodoido 12y agoHibernate comes to mind as a use case. That's always crapping huge stacks in production thanks to obscure edge cases.
- hrjet 12y agoWhile useful, I can't see how it could ensure that the right version of the source code is being presented to the user. In theory, it could analyse all versions of a library, and then choose only those versions that could lead to the given stack trace. Even that would be error prone, and may lead to multiple results. Setting up an IDE would take extra time, but would be the best way to debug the exception.
- jlebowskii 12y agoFinding the right version of the source code is definitely a challenge. However, it's a solvable one. What you're suggesting is actually what ExceptError does. It indexes all versions of each library, and uses context from the entire stack-trace, including line-numbers, method-names, etc, to find the exact match. Agree that IDE is the best way, especially when it comes to Java, but it's not always possible. For example you may be debugging distributed systems in production.
- jlebowskii 12y agoThe other thing is that even with an IDE, I think folks may find this useful. Not everyone uses Gradle, Maven, etc, and also not every library on Maven comes with the source jars.