# Analyze Stack Traces in Android Studio

DevFeed: [Analyze Stack Traces in Android Studio](<https://devfeed.tech/articles/analyze-stack-traces-in-android-studio-25825.md>)

Original publisher: [Read original article](<https://segunfamisa.com/posts/analyze-stack-trace-in-android-studio>)

Author: Segun Famisa

Published: 2020-06-22T09:00:00Z

Content type: tutorial

Language: en

Sources: [Segun Famisa](<https://devfeed.tech/sources/segun-famisa.md>)

Topics: [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Development](<https://devfeed.tech/topics/development.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [debug](<https://devfeed.tech/tags/debug.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [proguard](<https://devfeed.tech/tags/proguard.md>), [r8](<https://devfeed.tech/tags/r8.md>)

## AI overview

A tutorial on using Android Studio's built-in stack trace analysis tool to format imported crash reports and make their entries clickable and navigable. It also discusses obfuscated stack traces from release builds using ProGuard or R8/D8.

## Source excerpt

Introduction As programmers, we spend a significant part of our time debugging errors. Stack traces are very useful in doing so, and careful analysis of the stack traces help us to locate and fix the problem. In this post, I'll show a quick way we can use Android Studio to make it easier to debug errors using the built-in "stack trace analysis" tool. Context As Android developers, once an app is released into the wild (i.e deployed on a device outside our development environment), we have to rely on crash reporting tools like Firebase Crash reporting, Instabug, Appsee, etc, to collect these reports and aggregate them for us. The experience of working with stack traces varies from whether we are in development or in production. In development, we often get the stack traces right there in the logcat of Android Studio where each line in the stack trace is a clickable link that takes us straight to corresponding line of code. On the other hand, when we collect crash reports and stack traces in the wild, we collect them as text - sometimes formatted, sometimes not. This adds the additional overhead of having to format the stack trace in order to be human-readable and then manually search for the corresponding lines of code in the IDE. Using the "Anaylze Stack Trace" tool Luckily for us, Android Studio solves a part of this problem and makes it easier for us when we are analyzing stack traces that are generated in the wild. When you receive a stack trace, you can import them into Android Studio and introduce all the nice formatting, hyperlink and navigating functionality that we get as if it's a crash from the logcat. The Android Developer docs page pretty much explains how to use this tool, but I'll summarize the steps here: In the Android Studio menu bar, navigate to "Analyze > Analyze Stack Trace or Thread Dump" Paste the stack trace in the window Click "Normalize" to format the stack trace - in case it is not already formatted. Click on "OK" to complete this. On click