DEV Community

Cover image for sourcemap.tools — Apply source maps to the JavaScript error stack trace and get the original error position
Ramil Muratov
Ramil Muratov

Posted on

sourcemap.tools — Apply source maps to the JavaScript error stack trace and get the original error position

Hi all! I made a small application that helps "decipher" the stack trace of minified JS code and wanted to share it with the community.

It works like this: you paste a stack trace into the textarea, provide one or more source maps (by pasting or through a file input), and the application applies the source maps to the stack trace and displays the "original" stack trace. This way, you can see the exact position of the error in the original file.

Image description

When it might be helpful:

  1. You found an error in a production environment, but you don't host source maps and can't see on the developer tools where exactly it occurred

  2. The user found a bug and sent you a stack trace

  3. You get the stack trace from monitoring (e.g., Sentry) but do not configure it to work with source maps.

If you feel that such an application could be helpful to you, feel free to try it at https://sourcemaps.tools. The source is available at https://github.com/rmuratov/sourcemap.tools.

It probably contains bugs but should work in simple cases.. or at least I hope :)

There are other features that might be implemented, but I wonder if this could be useful to anyone at all, so I decided to collect some feedback first.

I will appreciate any feedback - first impressions, opinions, bug reports, feature requests.

Top comments (0)