Skip to content

Instantly share code, notes, and snippets.

@parisminton
Last active December 15, 2015 06:39
Show Gist options
  • Save parisminton/5217655 to your computer and use it in GitHub Desktop.
Save parisminton/5217655 to your computer and use it in GitHub Desktop.
For Mac. Fire up adb, start port forwarding and debug Web pages live on your Droid with one command. Save this function in, or source it from, your .bash_profile. Needs Eclipse, the Android Debug Bridge and desktop Chrome installed.
#!/bin/bash
function mobilechromedebug () {
previous_directory="$(pwd)"
cd /path/to/platform-tools/goes/here/
./adb forward tcp:9222 localabstract:chrome_devtools_remote
open -a "/Applications/Google\ Chrome.app" http://localhost:9222
cd $previous_directory
}
@parisminton
Copy link
Author

At the prompt: mobilechromedebug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment