Skip to content

MAUI WebView doesn't allow to web session to inspected in Safari developer tools (Mac Catalyst) #7706

@alexeystrakh

Description

@alexeystrakh

Description

WKWebView Safari developer tools (inspect option) are not available in a MAUI Mac app. If the same app is created using native tooling Xcode + Swift with no extra configuration/entitlements - it works (there is a visible session to inspect in Safari dev tools). If a new MAUI app is created with just a WebView in it (which created WKMauiWebView, which is essentially the same as WKWebView), Safari shows no debuggable sessions available.

Other scenarios tests - the same result with no option to debug the session:

  • BlazorWebView
  • Plain MacCatalyst WKWebView
  • MAUI WebView with custom handler with developerExtrasEnabled set

The source for all foud projects is in the following repository:
https://github.com/xamcat/maui-wkwebview-inspect

Steps to Reproduce

  1. Create new MAUI App
  2. Register WebView on the main page
 <WebView Source="https://www.apple.com"
             VerticalOptions="FillAndExpand"
             HorizontalOptions="FillAndExpand" />
  1. Run on Mac with dotnet build -t:Run -f net6.0-maccatalyst
  2. Open Safari and navigate to Develop-> <MacName>

Result: No inspectable application message
Expected: Web session created by WebView (WKWebView) is visible in debug tools

safari-debug-native-mac-app

safari-debug-maui-mac-app

safari-debug-maccat-mac-app

safari-debug-blazor-mac-app

Version with bug

6.0 (current)

Last version that worked well

Release Candidate 3 (current)

Affected platforms

macOS

Affected platform versions

maccatalyst 13.1

Did you find any workaround?

No workaround has been found.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-webviewWebViewfixed-in-8.0.0-preview.4.8333Look for this fix in 8.0.0-preview.4.8333!p/1Work that is important, and has been scheduled for release in this or an upcoming sprintpartner/cat 😻this is an issue that impacts one of our partners or a customer our advisory team is engaged withplatform/macosmacOS / Mac Catalystt/bugSomething isn't workingt/docs 📝

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions