Quash for Windows is here.Download now

Published on

|

15 mins

mahima
mahima
Cover Image for Android App Debugging Guide: Tools, Layout Inspector, Logcat & ADB (2026)

Android App Debugging Guide: Tools, Layout Inspector, Logcat & ADB (2026)

If you are debugging Android apps regularly, the hard part usually is not finding tools. It is knowing which tool to use for which problem.

A UI bug, a crash, a broken API call, a WebView rendering issue, and a flaky test locator can all feel similar from the outside. But they live in different layers of the app, and trying to solve them with the wrong tool is how teams burn hours and still end up guessing.

This guide breaks down the full Android debugging toolkit: when to use Layout Inspector, when Logcat is better, when ADB is faster, when Chrome DevTools matters, and when Appium Inspector is the only realistic option. If your team works on Android apps and keeps bouncing between UI issues, runtime bugs, WebView problems, and test failures, this is the guide that ties all of that together.

TL;DR

Android does not have one universal “Inspect Element” button like the browser does.

Use:

  • Layout Inspector for native UI hierarchy

  • Logcat for crashes, logs, and runtime behavior

  • Breakpoints for inspecting variables and execution flow

  • Network Profiler for API requests and responses

  • Chrome DevTools via chrome://inspect for WebView content

  • Appium Inspector or uiautomator dump for installed apps you do not control

  • ADB for device control, resets, installs, and command-line debugging

The real skill is not memorizing every tool. It is understanding which layer of the app you are actually debugging.

Ebook Preview

Get the Mobile Testing Playbook Used by 800+ QA Teams

Discover 50+ battle-tested strategies to catch critical bugs before production and ship 5-star apps faster.

100% Free. No spam. Unsubscribe anytime.

When to Use Each Android Debugging Tool

If you are not sure where to start, this table gets you there faster.

Situation

Best Tool

UI element missing or misplaced

Layout Inspector

App crashing

Logcat

Logic behaving unexpectedly

Breakpoints

API request failing

Network Profiler

WebView issue

Chrome DevTools

Need locators for automation

Appium Inspector

Need device control or reset

ADB

A lot of debugging gets easier the moment you stop treating every bug like a UI problem.

The Android Debugging Toolkit (Quick Overview)

Android debugging is not built around one master tool. It is a toolkit.

Each tool gives you visibility into a different part of the app:

Tool

What it helps you debug

Layout Inspector

UI hierarchy and view attributes

Logcat

Crashes, exceptions, lifecycle events, runtime behavior

Breakpoints

Execution flow, variable values, state at runtime

Network Profiler

API traffic, payloads, response timing

Chrome DevTools (chrome://inspect)

WebView HTML, CSS, JavaScript, console, network

Appium Inspector

Installed app UI hierarchy for automation

ADB (Android Debug Bridge)

Device control, installs, resets, screenshots, shell commands

That is why Android debugging feels confusing at first. People come in looking for one tool, but the correct answer depends on what layer they are actually trying to inspect.

Why “Inspect Element” on Android Feels Confusing

On the web, “inspect element” means something very specific. You right-click, open DevTools, inspect the DOM, tweak CSS, maybe check the console, and move on.

On Android, that same phrase can mean several completely different things.

You might be trying to inspect a native button on screen. You might be trying to inspect HTML inside a WebView. You might actually need logs, breakpoints, or network traffic instead of element inspection. Or you might be trying to inspect a third-party app just to get locators for automation.

That is why so many people search “inspect element android” and land on conflicting guides. Most of those guides are not exactly wrong. They are just solving different problems.

Once you understand that Android debugging is layered, the whole ecosystem starts to make sense.

Start by Identifying What Kind of Screen You’re Looking At

Before opening any tool, ask one question:

What is this screen actually made of?

That matters more than most tutorials admit.

If it’s a native Android screen you built yourself: This is the easiest case. If you are running a debuggable build, Android Studio gives you the full toolchain: Layout Inspector, Logcat, breakpoints, Network Profiler, and ADB.

If it’s a WebView inside an Android app: Now you are dealing with two layers. The native Android shell still belongs to Android tools. The web content inside the WebView belongs to Chrome DevTools.

That means a single screen can require two different inspection methods.

If it’s a third-party app or a build you don’t control: You cannot inspect it the same way you inspect your own debuggable build in Android Studio. But that does not mean you are blind. You can still inspect the exposed UI hierarchy using Appium Inspector or adb shell uiautomator dump, which is often enough for locator discovery and automation work.

If you are trying to inspect Android app elements, the first question is not “which tool should I use?” It is “what kind of screen is this?”

Set Up the Basics Before You Debug Anything

A lot of Android debugging failures are really setup failures.

If a tool will not attach, if your device does not show up, if Layout Inspector is blank, or if Chrome cannot see a WebView, the problem usually starts here.

Make the app debuggable

In build.gradle.kts:

android {
buildTypes {
debug {
isDebuggable = true
}
release {
isDebuggable = false
}
}
}

A debug build is required for the deeper Android Studio inspection workflow.

Turn on Developer Options

On most devices, go to Settings → About phone, then tap Build number seven times.

The exact path varies a bit by manufacturer, but it is always some version of that.

Enable USB debugging

Go to Settings → Developer options → USB debugging and switch it on.

Then run:

adb devices

You want to see your device listed as device.

If it shows unauthorized, revoke USB debugging authorizations on the device, reconnect it, and accept the trust prompt again.

If adb is missing from your shell:

export PATH="$PATH:$ANDROID_SDK/platform-tools"

This setup is basic, but it is where a surprising amount of wasted time goes.

Layout Inspector: The Main Tool for Native Android UI

If you own the app and the screen is native, Layout Inspector is usually what you actually need.

For most developers searching for a native Android equivalent of inspect element, this is the closest answer.

It lets you inspect the live UI hierarchy and check things like:

  • view IDs

  • bounds

  • padding and margins

  • visibility

  • text

  • colors

  • content descriptions

  • hierarchy structure

If a button is off-screen, invisible, overlapping, or missing the ID you expected, Layout Inspector will usually show that quickly.

When to use it

Use Layout Inspector when:

  • the UI looks wrong

  • a view is missing

  • elements overlap

  • the hierarchy is not what you expected

  • you need locators for automation

  • you want to inspect a Compose or View-based screen

Why it matters for automation too

It is not just a dev tool. QA teams use it heavily for locator discovery.

Two attributes matter most:

  • id, which maps to resource-id

  • contentDescription, which often maps cleanly to accessibility-based locators

If you are writing Appium tests, this is usually the right locator order:

  1. resource-id
  2. accessibility ID

  3. XPath as a fallback

XPath is still useful sometimes, but it is usually the first thing to break when someone refactors the hierarchy.

For a deeper walkthrough focused only on native app locator discovery, read How to Inspect Element on an Android App (Actual App, Not Web).

One thing older guides still get wrong

Some older tutorials talk about rotating the live layout in 3D view. That used to be part of the workflow. It is not in the old form anymore. You can still inspect layouts in 3D from a snapshot, but not through the old live 3D mode people reference in outdated posts.

Where Layout Inspector stops helping

Layout Inspector is for your own debuggable app. If you are trying to inspect a third-party app, skip ahead to Appium Inspector or uiautomator dump.

Logcat: When the App Is Already Telling You What Broke

If Layout Inspector shows what is on screen, Logcat shows what the app is doing behind it.

This is where you go when:

  • the app crashes

  • a flow silently fails

  • something behaves differently than expected

  • you need to trace lifecycle or state changes

  • you want evidence, not guesses

Open Logcat in Android Studio and filter by your package name immediately. Raw Logcat is too noisy to be useful.

Use tags you will recognize later

Log.d("CheckoutFlow", "Reached payment step, total=$total")
Log.e("PaymentAPI", "Request failed: code=$statusCode message=$errorMessage")
Log.w("CartViewModel", "clearCart() called on empty cart")

This looks basic, but it saves serious time once the app starts misbehaving.

How to read a crash quickly

When you hit a FATAL EXCEPTION, do not try to read the entire stack trace top to bottom.

Find the first line that points into your codebase.

E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.example.app, PID: 12345
E AndroidRuntime: java.lang.NullPointerException
E AndroidRuntime: at com.example.app.ui.CheckoutFragment.onViewCreated(CheckoutFragment.kt:87)

That last line is where you start.

A lot of people trying to debug Android apps go hunting through the UI first, even when the app already explained the real problem in Logcat.

Useful in CI too

If you run tests in CI, start Logcat before the tests:

adb logcat -c && adb logcat > logcat.txt &
./gradlew connectedDebugAndroidTest

Save the log as a build artifact so failed runs are still diagnosable afterward.

Breakpoints: Still the Fastest Way to Understand State

Logs are useful. But when you need to stop execution and inspect the app in that exact moment, breakpoints are still one of the fastest tools in Android debugging.

Use them when:

  • a variable is wrong

  • a callback fires unexpectedly

  • timing matters

  • a branch condition behaves differently than expected

One shortcut mistake causes a lot of confusion:

  • Shift + F10 runs

  • Shift + F9 debugs

If your breakpoints are not hitting, check that first.

The few debug controls that matter

  • F8: step over

  • F7: step into

  • F9: resume

  • Alt + F8: evaluate expression

Conditional breakpoints are worth using

Instead of pausing every time, pause only when the thing you care about appears.

orderId == "test_order_99"

or

index == 247

That saves you from clicking resume endlessly just to reach one edge case.

Network Profiler: Because the UI Is Not Always the Problem

A broken screen does not automatically mean a UI bug.

Sometimes the request never fired. Sometimes the wrong environment is configured. Sometimes the backend returned bad data and the UI is just rendering it honestly.

That is where the Network Profiler helps.

Use it to inspect:

  • whether the request happened

  • the endpoint

  • request headers

  • payload

  • response code

  • response body

If you want extra network visibility in logs, a debug-only OkHttp interceptor is still useful:

val client = OkHttpClient.Builder()
.apply {
if (BuildConfig.DEBUG) {
addInterceptor(
HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.BODY
}
)
}
}
.build()

This is one of the fastest ways to separate a real frontend bug from a backend or environment issue.

WebView Debugging: Use chrome://inspect for the Web Layer

If the screen is built in WebView, Android Studio is no longer the whole answer.

This is where Chrome DevTools comes in. If you are searching for WebView debugging, remote Android inspection, or chrome://inspect, this is the workflow you need.

Enable WebView debugging in the app

if (BuildConfig.DEBUG) {
WebView.setWebContentsDebuggingEnabled(true)
}

Keep this debug-only.

Then inspect it from Chrome

  1. Connect your device or start an emulator

  2. Open Chrome on your computer

  3. Go to chrome://inspect

  4. Make sure device discovery is enabled

  5. Click Inspect on the WebView target

This gives you DevTools for the WebView content:

  • HTML

  • CSS

  • JavaScript

  • console errors

  • network activity inside the web layer

Important limitation

Chrome DevTools only sees the content inside the WebView. It does not see the native Android toolbar, bottom navigation, or native wrapper around it.

So on hybrid screens, you often need:

  • Layout Inspector for the native layer

  • Chrome DevTools for the web layer

For the iOS side of this workflow, read How to Inspect Elements on iPhone. For Mac-side inspection workflows, read How to Inspect Element on Mac.

Appium Inspector: Best When You Don’t Control the App Build

If you are dealing with a third-party app, a shared QA build, or anything you cannot inspect through Android Studio’s debuggable-app workflow, Appium Inspector becomes much more useful.

Its job is not to replace Android Studio. Its job is to expose the current UI hierarchy and give you automation-friendly attributes like:

  • resource-id
  • content-desc
  • class name

  • text

  • bounds

That is often enough to get real work done.

Use it when:

  • you need locators

  • you are testing an installed app you did not build

  • your goal is automation, not live runtime debugging

  • Layout Inspector is not available

Modern Appium setup

For Appium 2.x, the typical setup flow is:

npm i --location=global appium
appium driver install uiautomator2
appium

Quick alternative

If you just need a hierarchy snapshot fast:

adb shell uiautomator dump /sdcard/ui_dump.xml
adb pull /sdcard/ui_dump.xml

For a simpler beginner walkthrough of Android element inspection methods, read How to Inspect Elements in an Android App.

ADB: Not Pretty, Still Essential

ADB is not glamorous, but it is one of the most reliable parts of the Android debugging stack.

These are the commands you will actually keep using:

# List connected devices
adb devices
# Install APK
adb install -r path/to/app-debug.apk
# Clear app data
adb shell pm clear com.example.app
# Uninstall app
adb uninstall com.example.app
# Capture screenshot
adb shell screencap /sdcard/screen.png && adb pull /sdcard/screen.png
# Dump current UI hierarchy
adb shell uiautomator dump /sdcard/ui_dump.xml && adb pull /sdcard/ui_dump.xml

ADB matters when:

  • you want repeatable debugging steps

  • you need quick state reset

  • you are working in CI

  • installation or environment issues are getting in the way

If you do enough Android debugging, you end up using ADB whether you planned to or not.

Jetpack Compose Changes the Debugging Mental Model

If your app uses Jetpack Compose, the basic idea stays the same, but the inspection mindset changes.

You are no longer thinking only in terms of XML views. You are thinking in terms of composables, state, modifiers, and recomposition.

That means debugging shifts toward questions like:

  • what is the composable hierarchy doing?

  • which parameter value is wrong?

  • is a modifier behaving unexpectedly?

  • is recomposition happening too often?

  • is state causing the UI glitch?

Layout Inspector still matters here. The difference is what you are looking for.

Emulator vs Real Device: Use Both, but Stop Treating Them as Identical

The emulator is great for speed. It is not a full replacement for real hardware.

Use the emulator for:

  • quick layout checks

  • basic debugging

  • flow validation

  • WebView inspection

  • fast development loops

Use a real device for:

  • performance confidence

  • camera and sensor behaviour

  • OEM quirks

  • memory pressure realism

  • hardware-specific issues

  • pre-release validation

It is also worth being precise here: biometrics are not completely impossible on emulator. Some biometric simulation exists. But if you want real-world confidence, especially around device-specific behavior, a physical device is still better.

The simplest rule:

Emulator for speed. Real device for confidence.

If you are debugging odd behaviour on Motorola or Lenovo devices, especially in test environments, read CQATest App on Android: What It Is and How to Fix It.

Android 14 and 15: The Biggest Practical Changes

You do not need a giant OS changelog here. You just need the changes that affect debugging in practice.

Back navigation is one of the big ones. If your app still relies on older assumptions, newer Android versions can expose bugs that look random but are really compatibility problems.

Another practical point: keep WebView debugging debug-only. That is just good security hygiene.

And if your app mixes native and web layers, newer Android versions have not changed the core reality: hybrid screens still need split tooling.

Common Things That Go Wrong, and the Fastest Fix for Each

Device shows unauthorized in ADB Revoke USB debugging authorizations on the device, reconnect it, and accept the trust prompt again.

Layout Inspector is blank Check that you are running a debuggable build.

Breakpoints never hit You are probably running instead of debugging.

WebView does not show up in chrome://inspect Make sure WebView.setWebContentsDebuggingEnabled(true) is actually being called in the debug build, and that the WebView is active.

INSTALL_FAILED_UPDATE_INCOMPATIBLE You are trying to install a build signed with a different key than the currently installed app. Uninstall the old one first.

Appium shows weak or strange element data That is not always a tool issue. Sometimes the app simply does not expose strong accessibility metadata.

When Manual Inspection Starts Slowing the Team Down

All of these tools are useful. You still need them.

But there is a point where debugging knowledge and debugging workflow become two different problems.

Inspecting one broken screen in Layout Inspector is manageable. Tracing one crash in Logcat is manageable. Running adb commands to reset app state or dump the hierarchy is manageable. The trouble starts when that same work needs to happen repeatedly across more devices, builds, and test scenarios.

That is when manual inspection starts to drag.

The problem is not that the Android tools are bad. They are not. The problem is that they were built to help you investigate individual issues, not carry repetitive QA effort across a growing release cycle.

If your team keeps rerunning the same flows across devices and OS versions, the real bottleneck usually stops being debugging and starts being repetition.

That is where a tool like Quash fits. Instead of stitching together locators, rerunning flows manually, and collecting screenshots from different places, your team can describe the scenario, run it on real devices, and review what happened in one place.

You still need the Android debugging stack. You just stop leaning on it for every repeated test pass.

Quick Reference

What you need to do

Best tool

Inspect native UI hierarchy

Layout Inspector

Find locators in your own app

Layout Inspector

Find locators in any app

Appium Inspector or uiautomator dump

Diagnose crashes

Logcat

Pause execution and inspect variables

Breakpoints

Inspect API requests and responses

Network Profiler

Debug HTML inside a WebView

Chrome DevTools via chrome://inspect

Control a device from terminal

ADB

Inspect Compose UI

Layout Inspector

Reduce repeated manual QA effort

Quash

FAQ: Android Debugging

Can I inspect a third-party app like Instagram?

Not with the full Android Studio debugging stack in the same way you can inspect your own debuggable app. But you can still inspect the exposed UI hierarchy using Appium Inspector or adb shell uiautomator dump.

What is the difference between Layout Inspector and Appium Inspector?

Layout Inspector is best when you own the app and are running a debuggable build in Android Studio. Appium Inspector is more useful when you need hierarchy inspection for automation, especially for apps or builds you do not control.

What is the best way to inspect WebView content in Android?

Enable WebView debugging in your debug build and inspect it through Chrome using chrome://inspect.

Is there a universal inspect element button on Android?

No. Native UI, WebView content, logs, runtime state, and third-party app hierarchies all need different tools.

Do I always need a real device?

No. The emulator is enough for a lot of development and inspection work. Real devices matter more for performance, hardware behaviour, OEM differences, and final QA confidence.

Is Appium Inspector still worth using in 2026?

Yes. If you are doing mobile automation and need hierarchy inspection outside Android Studio’s own debuggable-app workflow, it is still one of the most practical options.

Can I debug without Android Studio?

Yes. ADB, Appium Inspector, and external network tools all work independently. Android Studio just gives you the most complete all-in-one setup for layout inspection, logs, breakpoints, and profiling.

Related Guides in This Cluster

At the point where manual inspection is becoming the slowest part of QA, Quash can help teams run repeated mobile test flows on real devices without managing every locator and screenshot by hand.