Close the host process that invokes Edge WebView2.
Search for
environment
in Windows and openEdit the system environment variables
and 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
%USERPROFILE%\Desktop\net-export.json
.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.