You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -39,6 +42,12 @@ The following code demonstrates launching the app from Visual Studio Code (rathe
39
42
```
40
43
41
44
45
+
<!-- ---------------------------------- -->
46
+
#### Using a registry value
47
+
48
+
Instead of setting the `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` environment variable, you can add a new registry value named `<myApp.exe>` with data `--remote-debugging-port=9222` to the registry under registry key `Computer\HKEY_CURRENT_USER\Software\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments`, so that the debugger can find the proper port. For more information, see [WewbView2 browser flags](../concepts/webview-features-flags.md).
49
+
50
+
42
51
<!-- ---------------------------------- -->
43
52
#### Command-line URL parameter passed in
44
53
@@ -109,8 +118,7 @@ You might need to attach the debugger to running WebView2 processes. To do that
Your WebView2 control must open the Chrome Developer Protocol (CDP) port to allow debugging of the WebView2 control. Your code must be built to ensure that only one WebView2 control has a CDP port open, before starting the debugger.
@@ -144,6 +152,12 @@ You also need to add a new REGKEY `<myApp.exe> = --remote-debugging-port=9222` u
144
152

145
153
146
154
155
+
<!-- ---------------------------------- -->
156
+
#### Using an environment variable
157
+
158
+
Instead of adding the above registry key, you can set the `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` environment variable to `--remote-debugging-port=9222`. Make sure that your application is started after the environment variable is set, and make sure that your application inherits the environment variable. For more information, see [WewbView2 browser flags](../concepts/webview-features-flags.md).
0 commit comments