Skip to content

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

@bindreams

Description

@bindreams

While iterating on the dashboard frontend, it's useful to attach external inspection tools (Playwright, chrome-devtools-mcp, manual chrome://inspect) to the live dashboard. Currently dev.py launches hole without any debugging hook, so there's no way to attach.

Proposal

Update scripts/dev.py to inject WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9222 into the GUI process environment when launching. Print the CDP URL to the terminal so the developer knows where to attach.

On Windows: print WebView2 remote debugging: http://127.0.0.1:9222.
On macOS: WKWebView ignores the env var (no CDP equivalent), but Safari's Web Inspector is reachable via Safari → Develop → Hole → Hole Dashboard. Print that hint instead.

CDP-based tools (chrome-devtools-mcp, Playwright Chromium driver) cannot attach to a WKWebView — Playwright's WebKit driver is the alternative on macOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions