Close the host process that invokes Edge WebView2.
environmentin Windows and open
Edit the system environment variablesand click the Environment Variables... button to open the editing page.
Create a new user/system variable as follows:
Variable name: WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS
Variable value: --log-net-log=%USERPROFILE%\Desktop\net-export.json --net-log-capture-mode=Everything
You can choose a different path instead of
If you want the variable to be effective system-wide, create it as a system variable. Otherwise, create it as a user variable
Now launch the host process that invokes Edge WebView2, it will captuer Network Export log during its lifetime.