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
It’s possible to debug WebView contents in the Android emulator or on a device using Chrome DevTools.
MainActivity.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