Hacker News new | ask | show | jobs
by arturnt 4275 days 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?
2 comments

The 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.
While 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.

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

Hibernate comes to mind as a use case. That's always crapping huge stacks in production thanks to obscure edge cases.
The 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.