Skip to main content
Version: 5.x.x

Debugging WebViews

Android WebViews

On Android, in order to enable/disable debugging WebViews using chrome://inspect/#devices on Chrome, you should use the AndroidInAppWebViewController.setWebContentsDebuggingEnabled(bool debuggingEnabled) static method.

For example, you could call it inside the main function:

Future main() async {
WidgetsFlutterBinding.ensureInitialized();

if (Platform.isAndroid) {
await AndroidInAppWebViewController.setWebContentsDebuggingEnabled(true);
}

runApp(new MyApp());
}

iOS WebViews

On iOS, debugging WebViews on Safari through developer tools is always enabled. There isn't a way to enable or disable it.


Did you find it useful? Consider making a donation to support this project and leave a star on GitHub GitHub stars. Your support is really appreciated!