microsoft / vscode-edge-debug2

This is a VS Code extension which helps you debug your JavaScript Code inside the Edge browser.
Other
37 stars 31 forks source link

Unable to attach to Webview2 Process #192

Closed MRobertEvers closed 4 years ago

MRobertEvers commented 4 years ago

I am unable to debug a Webview2 ('native') application. However, I am able to use the Edge devtools to debug. https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide?source=f12help

With the Edge Devtools, I am able to debug with sourcemap. (See example, I can debug .ts with the Edge Tools) Capture

It seems that I just can't get the debugger to attach.

Steps to reproduce: I have an application that launches a Webview to http://localhost:4041/.

I can create a sample repository if needed.

I have tried two configuration. One 'launch' and one 'attach' configuration, however, neither work.

        {
            "name": "Launch localhost in Microsoft Edge",
            "type": "edge",
            "request": "launch",
            "trace": true,
            "url": "http://localhost:4041",
            "webRoot": "${workspaceFolder}",
            "useWebView": true,
            "runtimeExecutable": "${workspaceFolder}/debug/code-sample-client.exe"
        },

and

        {
            "type": "pwa-msedge",
            "request": "attach",
            "name": "Attach WebView",
            "urlFilter": "http://localhost:*/",
            "useWebView": true,
            "trace": true
        },
MRobertEvers commented 4 years ago

I realize that I was using the old EdgeHTML - a version that is not compatible with the extension.