How to Debug Android Chrome Browser Logs from a Windows Laptop

작성자

카테고리:

← 피드로
DEV Community · Naimul Karim · 2026-08-18 개발(SW)

Testing a website on a real Android device is often necessary when a problem cannot be reproduced in desktop Chrome or Chrome’s device emulation.

Chrome’s Remote Debugging feature allows you to connect an Android phone to a Windows laptop and inspect the mobile Chrome tab using desktop Chrome DevTools.

With this setup, you can inspect:

  • JavaScript console logs and errors
  • Network requests and API responses
  • Request and response headers
  • HTML and CSS
  • Cookies and browser storage
  • JavaScript source code
  • Breakpoints and debugging
  • Authentication and browser-specific issues

This guide covers the complete setup, including troubleshooting the common Pending authentication and unauthorized ADB errors.

Part 1: Set Up Android Remote Debugging

Step 1: Enable Developer Options on Android

Android hides Developer Options by default.

The exact steps can vary by manufacturer.

Google Pixel

Go to:

Settings → About phone → Build number

Tap Build number seven times.

You may be asked to enter your phone PIN.

Android should display a message indicating that Developer Options have been enabled.

Other Android Devices

The location can vary between Samsung, OnePlus, Xiaomi, Motorola, and other manufacturers.

If you cannot find it, search Android Settings for:

Build number

Enter fullscreen mode Exit fullscreen mode

Step 2: Enable USB Debugging

On a Google Pixel, go to:

Settings → System → Developer options

Find:

USB debugging

Turn it on and confirm the warning when Android asks.

USB debugging allows the Windows computer to communicate with the Android device through ADB.

Step 3: Connect the Android Phone to Windows

Connect your Android phone to your Windows laptop using a USB data cable.

Make sure the cable supports data transfer, not just charging.

Keep the phone unlocked

This is important because Android may need to display the USB debugging authorization prompt.

Windows may display a notification such as:

Choose what to do with this device

You can close this notification.

This is a Windows AutoPlay notification, not the Android USB debugging authorization prompt.

If necessary, open the USB notification on Android and select:

File transfer / Android Auto

Step 4: Authorize USB Debugging

After connecting the phone, Android should display:

Allow USB debugging?

The dialog will also display the computer’s RSA key fingerprint.

Select:

Always allow from this computer

Then tap:

Allow

This authorizes the Windows computer to communicate with your Android device through ADB.

Part 2: Open the Website on Android Chrome

Step 5: Open Chrome on the Android Device

On your Android phone:

  1. Open Chrome.
  2. Navigate to the website you want to test.
  3. Leave the website tab open.

The page you want to debug must be running in Chrome on the Android phone.

Part 3: Connect Chrome DevTools

Step 6: Open Chrome Remote Debugging on Windows

On your Windows laptop, open Chrome and navigate to:

chrome://inspect/#devices

Enter fullscreen mode Exit fullscreen mode

Make sure this option is enabled:

Discover USB devices

Your Android device should appear on the page.

Under the device, Chrome should display the Chrome tabs currently open on your Android phone.

You should see something similar to:

Android Device
    Chrome
        https://example.com
        inspect

Enter fullscreen mode Exit fullscreen mode

Find the website you want to debug and click:

Inspect

Part 4: Debug the Android Website

Chrome DevTools will now open on your Windows laptop.

Although DevTools is running on Windows, it is connected to the webpage running on the physical Android device.

Console

Use the Console tab to inspect:

  • console.log() output
  • JavaScript errors
  • Warnings
  • Uncaught exceptions
  • Runtime errors

Network

Use the Network tab to inspect:

  • API requests
  • HTTP status codes
  • Request payloads
  • Response bodies
  • Request headers
  • Response headers
  • Request timing
  • Failed requests

Example: Login works on desktop but fails on Android

  1. Open Network.
  2. Perform the login on the Android phone.
  3. Find the login/API request.
  4. Open the request.
  5. Inspect:
    • Headers
    • Payload
    • Response
    • Status Code

You can now see what the physical Android browser actually sent and received.

Part 5: Troubleshooting Pending authentication

Sometimes chrome://inspect/#devices detects the Android phone but cannot establish the debugging connection.

You may see:

Device information is stale.
Offline
#DEVICE_SERIAL
Pending authentication: please accept debugging session on the device.

Enter fullscreen mode Exit fullscreen mode

At the same time, the phone may indicate that USB debugging is connected.

This usually means:

Windows can detect the Android device, but the ADB authorization handshake has not completed successfully.

The easiest way to troubleshoot this is to reset the ADB authorization.

Step 1: Install Android Platform Tools

Download SDK Platform-Tools for Windows from Google’s Android developer website:

https://developer.android.com/tools/releases/platform-tools

Extract the downloaded ZIP file.

Inside the extracted platform-tools directory, you should see files such as:

adb.exe
fastboot.exe

Enter fullscreen mode Exit fullscreen mode

The adb.exe executable is what we will use to check and manage the Android connection.

Step 2: Open Command Prompt in platform-tools

Open the extracted platform-tools directory in Windows File Explorer.

Click the File Explorer address bar.

Type:

cmd

Enter fullscreen mode Exit fullscreen mode

Press Enter.

Command Prompt should open directly in the platform-tools directory.

For example:

C:\Users\YourName\Downloads\platform-tools>

Enter fullscreen mode Exit fullscreen mode

This allows you to run ADB commands without adding ADB to the Windows PATH.

Step 3: Check the ADB Connection

Run:

adb devices

Enter fullscreen mode Exit fullscreen mode

If authorization has not completed, you may see:

List of devices attached
DEVICE_SERIAL    unauthorized

Enter fullscreen mode Exit fullscreen mode

The important part is:

unauthorized

Enter fullscreen mode Exit fullscreen mode

This means:

  • Windows can see the Android device.
  • ADB can detect the device.
  • The Android device has not authorized this computer.

Step 4: Reset USB Debugging Authorization

On your Android phone, go to:

Settings → System → Developer options

Select:

Revoke USB debugging authorizations

Confirm the action.

Then turn:

USB debugging → Off

Step 5: Restart the ADB Server

On Windows, run:

adb kill-server

Enter fullscreen mode Exit fullscreen mode

Disconnect the USB cable from the phone.

Then:

  1. Turn USB debugging back on.
  2. Reconnect the USB cable.
  3. Keep the phone unlocked.

Start ADB again:

adb start-server

Enter fullscreen mode Exit fullscreen mode

You may see:

* daemon not running; starting now at tcp:5037
* daemon started successfully

Enter fullscreen mode Exit fullscreen mode

Then check the device:

adb devices

Enter fullscreen mode Exit fullscreen mode

Step 6: Accept the Android Authorization Prompt

Look at your Android phone.

You should now receive:

Allow USB debugging?

Select:

Always allow from this computer

Then tap:

Allow

This is the critical step.

If the authorization dialog does not appear, keep the phone unlocked and try disconnecting and reconnecting the USB cable.

Step 7: Verify ADB Authorization

Run:

adb devices

Enter fullscreen mode Exit fullscreen mode

Before authorization

You may see:

List of devices attached
DEVICE_SERIAL    unauthorized

Enter fullscreen mode Exit fullscreen mode

After successful authorization

You should see:

List of devices attached
DEVICE_SERIAL    device

Enter fullscreen mode Exit fullscreen mode

The important change is:

unauthorized

Enter fullscreen mode Exit fullscreen mode

to:

device

Enter fullscreen mode Exit fullscreen mode

This confirms that ADB authorization has succeeded.

Step 8: Return to Chrome Remote Debugging

On Windows, refresh:

chrome://inspect/#devices

Enter fullscreen mode Exit fullscreen mode

The Pending authentication message should disappear.

Now:

  1. Open Chrome on the Android phone.
  2. Navigate to the website you want to test.
  3. Keep the tab open.
  4. Refresh chrome://inspect/#devices on Windows.
  5. Find the Android Chrome tab.
  6. Click Inspect.

You can now use Chrome DevTools normally.

Quick Troubleshooting Checklist

If your Android Chrome tab does not appear:

  • [ ] Developer Options are enabled.
  • [ ] USB debugging is enabled.
  • [ ] The Android phone is unlocked.
  • [ ] The USB cable supports data transfer.
  • [ ] The phone is connected using File transfer / Android Auto if necessary.
  • [ ] Discover USB devices is enabled in chrome://inspect/#devices.
  • [ ] adb devices detects the phone.
  • [ ] The phone is not shown as unauthorized.
  • [ ] You accepted Allow USB debugging? on the phone.
  • [ ] adb devices reports the device as device.
  • [ ] The website is open in Chrome on the Android phone.
  • [ ] You refreshed chrome://inspect/#devices.

The Complete Flow

Once everything is working, the debugging flow looks like this:

Android Chrome
      ↓
USB Debugging
      ↓
ADB
      ↓
Windows Laptop
      ↓
chrome://inspect/#devices
      ↓
Chrome DevTools
      ↓
Console / Network / Elements / Application / Sources

Enter fullscreen mode Exit fullscreen mode

The important distinction is that the website runs on the physical Android device, while the DevTools interface runs on your Windows laptop.

Why Use a Real Android Device?

Chrome’s desktop device emulation is useful, but it cannot reproduce every behavior of a physical Android device.

Remote debugging is especially useful for investigating:

  • Mobile-only JavaScript errors
  • Authentication problems
  • API failures
  • Cookie and storage issues
  • Browser-specific behavior
  • Responsive UI problems
  • Touch-related issues
  • Network problems
  • Mobile Chrome rendering issues
  • Problems that cannot be reproduced using desktop Chrome

When an issue occurs only on a real Android phone, remote debugging gives you direct access to the browser’s Console, Network, Elements, Application, and Sources tools while the application is running on the actual device.

Conclusion

Connecting a real Android device to Chrome DevTools is straightforward once ADB authorization is working.

The normal flow is:

Enable Developer Options
        ↓
Enable USB Debugging
        ↓
Connect Android to Windows
        ↓
Authorize the Computer
        ↓
Open Chrome on Android
        ↓
chrome://inspect/#devices
        ↓
Click Inspect
        ↓
Debug with Chrome DevTools

Enter fullscreen mode Exit fullscreen mode

If Chrome shows:

Pending authentication

Enter fullscreen mode Exit fullscreen mode

and ADB shows:

unauthorized

Enter fullscreen mode Exit fullscreen mode

the key is to reset USB debugging authorization, restart ADB, reconnect the phone, and accept the authorization prompt on Android.

Once adb devices changes from:

unauthorized

Enter fullscreen mode Exit fullscreen mode

to:

device

Enter fullscreen mode Exit fullscreen mode

Chrome Remote Debugging should be able to establish the connection.

Tags

#android #chrome #devtools #debugging #webdevelopment #javascript

원문에서 계속 ↗