Here are some helpful React Native WebView debugging tips.
It’s possible to debug WebView contents in the iOS simulator or on a device using Safari Developer Toolkit.
When debugging on device you must enable Web Inspector in your device settings:
Settings -> Safari -> Advanced -> Web Inspector
Also, if you don’t see your device in the Develop menu, and you started Safari before you started your simulator, try restarting Safari.
It’s possible to debug WebView contents in the Android emulator or on a device using Chrome DevTools.
MainApplication.java
to enabled web contents debugging:
```java
import android.webkit.WebView;@Override public void onCreate() {
super.onCreate();
…
WebView.setWebContentsDebuggingEnabled(true);
} ```
When debugging on device you must enable USB debugging in your device settings:
Settings -> System -> About Phone -> Developer options -> enable USB debugging