This PR adds support for debugging advanced WebView2 scenarios such as:
Single WebView that doesn't load until later in the application workflow
Multiple WebViews in a single application
Multiple applications that share WebViews
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.
This PR adds support for debugging advanced WebView2 scenarios such as:
Essentially the PR adds a new
advanced
option for theuseWebView
property. When selected, the debugger will use node'snet.createServer()
to create a server with a unique name. That name will then be passed to the WebView via theWEBVIEW2_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
advanced
option foruseWebView