We love exploring the latest build tools and techniques to improve our code. Crunching, minifying, and combining code can help make our applications faster, but it also makes it really hard to debug.

TypeError: e is undefined. scripts.js line 1

Source maps is a proposed spec to make debugging easier by linking our minified code with the original sources. While still unapproved and changing, many tools like Uglify, Google’s Closure Compiler, and CoffeeScript support generating source maps.

Many of you asked us to support source maps with an emphasis on privacy. While storing the map files and unminified code publicly makes debugging easier, it also allows others to easily reverse engineer your code. With this on our mind, we’ve released support for Privacy-Enhanced Source Maps that is handled entirely in-browser. Your proprietary source code and source maps are never made publicly available. All processing is done in the browser and applied to your error messaging and stack traces.

You can use source maps with TrackJS today. Simply drag and drop a source map directly on a related stack-trace. We’ll automatically associate, process, and display the un-minified stack trace. This even works with a concatenated script, we’ll only un-minify parts of the stack trace associated with the source map.

Applying Sourcemaps

With the popularity and utility of build and processing tools, source maps will most certainly be a part of every JavaScript developers tool-kit soon. With TrackJS, you can effectively use source maps today without losing your ability to debug problems!

We’re always looking for feedback on how to make our system better. If you have an idea, complaint, or compliment please send it to us!

Did you like this?
Frontend Developer

What to do Next:

1. Try TrackJS on Your Website

TrackJS gives you the visibility to find and fix your errors before users find them. Get started in 5 minutes tracking errors with all the context you'll need to squash the important bugs in your app.

2. Get the Debugger Newsletter

Join The Debugger for amazing JavaScript tips, debugging walkthroughs, news, and product releases for Request Metrics. No more than once a week, probably a lot less.