This article lists some command-line flags I used to troubleshoot Edge/Chrome issues. I will keep updating this page as long as I support Microsoft Edge.
--user-data-dir
msedge.exe --user-data-dir=c:\temp\NewEdgeUser
This command-line flag overrides the User Data Directory, see User Data Directory for more details.
--do-not-de-elevate
Microsoft Edge will attempt to silently deelevate and relaunch itself when launched as an Administrator, running at Medium IL instead of High. If this feature is disabled (--do-not-de-elevate), Edge will show a warning to help users recognize the unexpected situation:
See Sandboxing vs. Elevated Browsing (As Administrator) for more details.
--winhttp-proxy-resolver
Instructs Edge/Chrome to use the system libraries for one narrow part of proxy resolution: evaluating a given PAC script or auto detecting WPAD.
- --winhttp-proxy-resolver command line switch
- Web Proxy Auto Discovery (WPAD)
- WinHttpProxyResolverEnabled
--disable-features
RendererCodeIntegrity
msedge.exe --disable-features=RendererCodeIntegrity
Renderer code integrity
is enabled by default, but in some case it may cause Edge to crash. There was a known issue where Symantec would cause Chrome and Edge to crash with error code: STATUS_INVALID_IMAGE_HASH
, details can be found at: Google Chrome/Microsoft Edge Chromium version 78.0.x and 79.0.x error "Aw, Snap! Something went wrong while displaying this webpage." when using Endpoint Protection, disabling Renderer code integrity was a workaround. Edge also has a group policy setting to disable it: RendererCodeIntegrityEnabled
msDownloadsHub
msedge.exe --disable-features=msDownloadsHub
Above command disables the new download experience of Edge Chromium.
msEnhancedTrackingPreventionEnabled
msedge.exe --disable-features=msEnhancedTrackingPreventionEnabled
Edge uses a throttle to implement Tracking Prevention feature. Some compatibility issues like XHR race can be ruled out by disabling this feature. See ericlaw's post: Debugging Compatibility in Edge
--enable-logging
OneAuth log
msedge.exe --enable-logging -v=1 --oneauth-log-level=5 --oneauth-log-pii
For Edge identity issues, we can use this command-line to generate OneAuth log. Log will be saved as chrome_debug.log
under User Data Directory.
Dual Engine log
msedge.exe --enable-logging --vmodule=*/dual_engine/*=1
For Edge dual engine (IE Mode) issues, we can use this command line to generate Dual Engline debug log. Log will be saved as chrome_debug.log
under User Data Directory.
--trace-startup
SmartScreen trace
To automatically take a SmartScreen trace of Edge from startup launch Edge with the following command line arguments:
msedge.exe --trace-startup=SmartScreen --trace-startup-file=c:\temp\SmartScreenTrace.json --trace-startup-duration=86400 --trace-startup-record-mode=record-as-much-as-possible
--user-agent
A string used to override the default user agent with a custom one. We can use following command to let Edge send the same User-Agent string as Chrome to rule out some compatibility issue caused by different User-Agent header.
msedge.exe --user-agent="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36"