Hacker News new | ask | show | jobs
by jlebowskii 4275 days ago
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.
2 comments

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.