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

Add multiple WebView support #163

Closed jalissia closed 4 years ago

jalissia commented 4 years ago

This PR adds support for debugging advanced WebView2 scenarios such as:

Essentially the PR adds a new advanced option for the useWebView property. When selected, the debugger will use node's net.createServer() to create a server with a unique name. That name will then be passed to the WebView via the WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER environment object. The server will then listen for messages which come in the form of a JSON payload. When a notification of a new WebView creation event is received, the port and url info will be used to see if the debugger should attach to that target.

The details of how the WebView2 debugging settings work can be found here: https://docs.microsoft.com/en-us/microsoft-edge/hosting/webview2/reference/webview2.idl

webview-advanced