← Blog Home

source-maps Blog Posts

Debugging JavaScript with Source Maps

Written By Mike Smith February 6th, 2018

One of the frustrating situations I often encounter when debugging JavaScript, is tracking down JavaScript errors to line 23 col 63475. I felt as though I was right on the edge of seeing the offending code and being able to fix it. And then, reality came crashing down. I realized that I’ve managed to debug myself right into the middle of a minified JavaScript file 😞.

There is a better way - Source Maps. JavaScript source maps are the key to taking what you’ve narrowed down in the minified code, and then being able to map them back to the source code so that you can view and resolve the problem without having to figure it out in the minified code.

Read more

Major JavaScript source map updates

Written By Jesse Gibbs April 20th, 2017

We’re excited to introduce a major update to JavaScript source map support in Rollbar! This update introduces several features unique to Rollbar (source map search, source map failure logs, inline warnings in stack traces) that are critical to anyone using client-side JavaScript in a large-scale, continuous deployment environment.

Read more

Using JavaScript source maps to debug errors

Written By Rivkah Standig February 13th, 2017

Some of the most common questions we get here at Rollbar deal with source maps:

  • What are source maps and what do they do?
  • How can you enable source mapping?
  • Why aren't your source maps working properly?

Let's explore Javascript source maps together, starting with the basics.

Existing Rollbar users, go to our JavaScript source maps documentation to get started.

As web developers, we have two major goals. First, we want a highly performant website. Second, we want that website to be easy to debug and maintain. Unfortunately, these goals are often at odds with one other. If we minimize our JavaScript, we can achieve some of these goals. Minimizing JavaScript reduces the download size, and the smaller the payload for our website users, the better. If we combine our JavaScript files, we can also reduce the number of http requests.

Read more

Debug Production Errors in Minified JavaScript with Source Maps and Rollbar

Written By Brian Rue July 25th, 2013

Rollbar just got a much-requested feature: Source Maps support for Javascript. If you minify your Javascript code in production, this will make debugging production errors much easier. This feature is now live for all accounts.

Here's a link to a recently updated tutorial on using JavaScript source maps with Rollbar.

What Are Source Maps?

If you minify your Javascript code (i.e. using UglifyJS2 or the Closure Compiler), it gets harder to debug errors. Stack traces reference the line/column numbers in the minified code instead of the original source code.

Source Maps were designed to resolve this; they provide a mapping back from the minified line/column numbers to the original code. Chrome and Firefox have tools to use them in development, but what about errors that happen in production?

Read more

Join Our Community

Get the latest updates, tutorials and more, delivered to your inbox, once a month.

Join Our Community

Get the latest updates, tutorials and more, delivered to your inbox, once a month.