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

Answer: 
There are little hack in here for IOS.
In XCode open AppDelegate.m from project folder, comment the line with jsCodeLocation declaration and add near it something like this:

```
jsCodeLocation = [NSURL URLWithString:@"http://%YOUR_PC_IP%:8081/index.ios.bundle?platform=ios&dev=true"];

```

, where %YOUR\_PC\_IP% is IP of your dev machine on local net.

Then open project named RCTWebSocket wich located in Libraries folder and then open from this project file RCTWebSocketProjectExecutor.m. Next, comment the line with host declaration, then add near it something like that:

```
host = @"%YOUR_PC_IP%";

```

Almost done. Run app on your device with XCode and make sure that your IPhone can see your develop machin via internet.

After it launches make sure that node server is running (command "react-native -- --start" in root project folder) and open via chrome this page: <http://localhost:8081/debugger-ui> . Plus, option Debug JS Remotely must be enabled in your app on your IPhone. (Shake action, then tap in opened menu Debug JS Remotely, that is it.)

Now open dev console and have happy debugging.
If you are working on **Visual Studio Code** then you can install `React Native Tools` extension (provided by `Microsoft`) and debug your app like any other IDE.

Read all steps in detail in my [this answer](https://stackoverflow.com/a/56233781/1055241).