Making stack traces more useful with symbolication

Duncan Hewett

Making stack traces more useful with symbolication

When debugging errors, symbolicated stack traces are essential because they provide visibility into where the errors originated in the code. Bugsnag displays symbolicated stack traces for every error, pinpointing the exact line of code that crashed so the bug impacting the user experience can be fixed quickly. Let’s dive into why symbolication of stack traces is necessary, how Bugsnag symbolicates stack traces for more efficient debugging, and some enhancements we’ve introduced to make management of uploaded mapping files a breeze.

The importance of symbolication

When an application is built, full information about the source code being executed is not included in the application for a number of reasons:

  • To optimize the performance of the application so that it can run faster
  • To make the application smaller to download and store via minification, which removes all unnecessary characters from the application
  • To prevent others from copying the code by obfuscating it, or replacing all variable names with a single letter

While removing the original source code from the application can be useful for many reasons, it can make debugging errors in the application more difficult for engineers. The stack trace generated when an error occurs is not useful, because it does not show the code that was being executed. The process of converting a stack trace so that it’s useful is called symbolication or mapping. Here is an example of a symbolicated stack trace versus one that hasn’t been symbolicated.

Android error with a symbolicated stack trace.

Android error with a stack trace that has not been symbolicated.

How Bugsnag symbolicates stack traces

Bugsnag symbolicates, deobfuscates, or un-minifies the automatically captured stack traces by referencing mapping files. These files can be uploaded to Bugsnag at build time, as they will be different for each release. Various mapping file formats are supported, including:

Bugsnag also offers build tool integrations with Gradle, Fastlane, and many others which can help automate the process of uploading mapping files.

Easily manage mapping files

In order to make it easier to understand which mapping files have been uploaded successfully or which files are missing, we’ve added a few new pages to Project Settings. Now, mapping files that have been uploaded to Bugsnag for deobfuscation of stack traces can be easily managed under Manage source maps, Manage NDK Symbol mappings, Manage ProGuard mappings, and Manage dSYMs mappings.

ProGuard mapping files can be found in the Manage ProGuard mappings page under Project Settings.

Bugsnag is an application stability management platform that helps businesses improve app stability and user experience. If you’re new to Bugsnag, you can start a free 14-day trial here.

Share