Question: How do you debug react-native when it is running on device ?

Answer: 
You have two options: 

1. Debug remotely

iOS: Cmd + ctrl + z to open menu and select "Debug remotely"

Android: Cmd + M to open menu and select "Debug remotely"

2. Or run one of these commands:

```
react-native log-ios
react-native log-android

```
***2*** options exist:

**Remote debug:** this would go over network, so it can be laggy.
-----------------------------------------------------------------

1. Run app on device (install it whilst its plugged in)
2. Shake device (Android devices need to be **vigorously shaken**)
3. Press `settings` on the dev menu, and under `Debugging`, press `Debug server host and port for device`
4. Enter your debug server's IP address and port (usually 8081 unless you changed your settings of the debug server), e.g. 255.255.255.255:8081. Your ip address is the local IP address that your computer has. Ensure the device is on the same network. For mac users, open `System Preferences` → `Network` → `Wifi` → Under `Status: connected`, there is an IP address, use that.
5. You can unplug the device
6. Ensure debug mode is on (Shake device vigorously again, press Debug)

Wired debug: relatively better for slow connections
---------------------------------------------------

1. Install app on phone
2. If android, set up port forwarding with `adb reverse tcp:8081 tcp:8081` and if iOS, follow the steps from [RN docs](https://facebook.github.io/react-native/docs/debugging.html#debugging-on-a-device-with-chrome-developer-tools))
3. Enable debug on device