Skip to content

Expose WebView2 CDP on dev launcher#140

Merged
bindreams merged 5 commits intomainfrom
azhukova/129
Apr 7, 2026
Merged

Expose WebView2 CDP on dev launcher#140
bindreams merged 5 commits intomainfrom
azhukova/129

Conversation

@bindreams
Copy link
Copy Markdown
Owner

Closes #129.

Summary

  • `scripts/dev.py` injects `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9222` into the GUI process env. Appends to any existing value rather than overwriting.
  • Prints platform-specific guidance:
    • Windows: `WebView2 remote debugging: http://127.0.0.1:9222\` — attach via Playwright Chromium driver, chrome-devtools-mcp, or `chrome://inspect`.
    • macOS: `WKWebView remote debugging: Safari → Develop → Hole → Hole Dashboard` — WKWebView ignores the env var (no CDP equivalent), but Safari's Web Inspector reaches it via XPC. CDP-based tools cannot attach; Playwright's WebKit driver is the alternative.

Test plan

  • Manual: `uv run scripts/dev.py` and verify the remote debugging URL is printed near startup
  • Manual: `curl -X GET http://127.0.0.1:9222/json\` returns the WebView2 page list

@bindreams bindreams enabled auto-merge (squash) April 6, 2026 22:27
@bindreams bindreams disabled auto-merge April 7, 2026 16:18
@bindreams bindreams merged commit c1bf742 into main Apr 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dev.py should expose Chrome DevTools Protocol on the WebView2 for external inspectors

1 participant