setWebContentsDebuggingEnabled method
{@template flutter_webview_platform_interface.PlatformInAppWebViewController.setWebContentsDebuggingEnabled}
Enables debugging of web contents (HTML / CSS / JavaScript) loaded into any WebViews of this application.
This flag can be enabled in order to facilitate debugging of web layouts and JavaScript code running inside WebViews.
Please refer to WebView documentation for the debugging guide. The default is false.
debuggingEnabled whether to enable web contents debugging.
NOTE: available only on Android 19+.
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - WebView.setWebContentsDebuggingEnabled) @{endtemplate}
Implementation
@override
Future<void> setWebContentsDebuggingEnabled(bool debuggingEnabled) async {
Map<String, dynamic> args = <String, dynamic>{};
args.putIfAbsent('debuggingEnabled', () => debuggingEnabled);
return await _staticChannel.invokeMethod(
'setWebContentsDebuggingEnabled', args);
}