No items found.
September 4, 2014

Improved JavaScript Stacktrace Support

JavaScript stack traces can be messy. You’ve probably seen how varied they are, with different browsers using their own unique style to display them. Some older browsers don’t even have stack traces, like Internet Explorer 9 or Safari 5.1, making it extra challenging to track down an error. But what does this all mean for a developer? How can you reliably debug your JavaScript code across all browsers? You need a powerful tool to help you — one that takes all these differences into account, and provides you with answers that make sense.

stack trace

Today we’re pleased to announce a huge upgrade to the Bugsnag Javascript Notifier to better support stack traces from all browsers. We now group exceptions better across the board, get more information from IE 9, and group exceptions correctly inside [CODE]eval()[/CODE] most of the time.

Stack Trace Formats

A stack trace is typically exposed via the [CODE]stack[/CODE] property of a thrown Exception. Newer browsers have more detailed exceptions, but they can be too detailed at times. Here is an example of a function that crashes and and prints a stack trace for the caught exception.

-- CODE language-javascript --
function oops() {
 (function(a) {
   try {
   } catch (ex) {

Running the code in Chrome, Opera or IE 10+ gives the following stack trace:

-- CODE language-plaintext --
TypeError: Cannot read property 'undefined' of null
   at file:///Users/kyrylosilin/crashy.html:13:8
   at oops (file:///Users/kyrylosilin/crashy.html:17:9)
   at file:///Users/kyrylosilin/crashy.html:19:1

But in Firefox, or Safari, you get:

-- CODE language-plaintext --

Bugsnag now recognizes these, and many other minor variations, as exactly the same stack trace. So exceptions will be grouped together correctly, and displayed in an easy to read format on the Bugsnag dashboard.

We now have better support for grouping exceptions and showing stack traces in Opera Mobile, Internet Explorer 9 and older, Android 2 and 3. On top of that, Bugsnag support for eval has been vastly improved for all browsers.

Get started catching exceptions right now!

BugSnag helps you prioritize and fix software bugs while improving your application stability
Request a demo