Ubuntu & Linux Tutorials, Tips & Guides

How to Debug Chrome for Android on Ubuntu

If you are developing a web site or web app that will be used on Android it can be difficult to debug with out developer tools. Here's how to use the Chrome Dev Tools in Ubuntu to remotely debug Chrome on Android.

  1. Enable USB debugging on Chrome for Android:

    Settings > Developer Tools > Enable USB Web debugging

  2. Enable USB debugging on Android Device:

    Settings > Developer Tools > USB debugging

    If Developer Options are not there (using Android 4.2):

    Settings > Click Build number seven times - Developer Options is now unlocked

  3. Connect Android Device to Computer

  4. Install Android Debug Bridge (adb)

    Open up the terminal (Ctrl+Alt+t) and enter the following two commands:

    sudo add-apt-repository ppa:phablet-team/tools && sudo apt-get update
    sudo apt-get install android-tools-adb
  5. Enable port forwarding on Computer

    Enter the following command in the terminal:

    adb forward tcp:9222 localabstract:chrome_devtools_remote

    Note: You will need to run this command each time you connect your android device.

  6. Open the Developer Tools in Chrome

    Open Chrome (on Ubuntu) and navigate to http://localhost:9222

comments powered by Disqus