Skip to content

How to debug with an android device and Chrome

Ben Clark edited this page May 25, 2022 · 3 revisions

This page explains how to setup an android device to debug with Chrome's debugger tools, so that breakpoints can be hit live in your IDE.

You will need:

  • A Mac Laptop

  • VS Code installed

  • An Android phone / tablet running Android v12 w/USB Cable

  • Some patience

  • Start by setting up remote debugging with this chrome developer page.

    • While going through that page, you'll turn on Debugger mode in your device, and ensure that under the debug options now available to you, enable USB debugging . Then you'll ensure that chrome's 'discover usb devices' checkbox is enabled. That's the basics for getting connectivity happening between your android device/chrome.

When you're done setup, you should see your device in the chrome://inspect/#devices page: image

If you click on 'port forwarding' and set '8080' -> '127.0.0.1:8080' this will allow you to debug the app by entering 'localhost:8080' into the browser bar.