Skip to content

Instantly share code, notes, and snippets.

@bapjiws
Last active August 12, 2018 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bapjiws/1c05bf837284f1e69ae3e0dcc1312466 to your computer and use it in GitHub Desktop.
Save bapjiws/1c05bf837284f1e69ae3e0dcc1312466 to your computer and use it in GitHub Desktop.
Remote debugging for Android and iOS

Add alias ios-simulator="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/" to ~/.bash_profile (in my case ~/.zshrc). Restart the shell or run source ~/.zshrc.

Install iOS Simulator: Xcode > Preferences > Components

Gotcha: iOS Simulator refused to connect to localhost with VPN enabled.

See this article for more detail.

Remote debugging for Android devices via Chrome + chrome://inspect/#devices, also see port forwarding to access locahost from the Android device.

Install Android Studio

Android Virtual Device (AVD) Tools > AVD Manager > Create Virtual Device...

Gotcha: Tools > AVD Manager wasn't there, so you can either set a shortcut to it via the Preferences or enable View > Toolbar in which the AVD Manager should be visible.

Add alias android-simulator="/Users/alb/Library/Android/sdk/emulator/emulator -avd Nexus_5X_API_28" to ~/.bash_profile (in my case ~/.zshrc). Restart the shell or run source ~/.zshrc.

/Users/<username>/Library/Android/sdk/emulator/emulator -list-avds

Enable Developer options: https://developer.android.com/studio/debug/dev-options Ports: https://developer.android.com/studio/run/emulator-networking

Create and manage virtual devices: https://developer.android.com/studio/run/managing-avds Start the emulator from the command line: https://developer.android.com/studio/run/emulator-commandline

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