In this article, we will go over several command-line flags that can be useful for troubleshooting issues with Microsoft Edge and Google Chrome. These flags allow you to override certain default settings and can be a valuable tool for debugging problems. I will periodically update this page with additional flags as needed.
--user-data-dir flag allows you to specify a custom location for the user data directory, which stores information such as your browser history, bookmarks, and extensions. This can be useful if you want to create a separate profile for testing purposes or if you are encountering issues with the default user data directory.
For more information on the
--user-data-dir flag, you can check out User Data Directory.
--profile-directory flag allows you to specify a custom directory name for a new profile within the user data directory. This can be useful if you want to create multiple profiles with different settings or configurations for testing or troubleshooting purposes.
To create a new profile with the
--profile-directory flag, you can use a command like this:
msedge.exe --profile-directory=TestProfile --user-data-dir=c:\temp\TestEdgeUser
This will create a new profile named
TestProfile within the user data directory located at
c:\temp\TestEdgeUser, or load an existing profile with that name if it already exists. You can use any directory name you like and specify any custom location for the user data directory using the
--do-not-de-elevate flag disables a feature in Microsoft Edge that automatically relaunches the browser as a non-administrator (running at Medium IL instead of High) if it was launched with administrator privileges. By using this flag, you can prevent Edge from silently de-elevating itself and instead display a warning to the user, helping them recognize that the browser is running with elevated privileges. This can be useful for developers or IT professionals who need to troubleshoot issues with the browser while running it as an administrator, as it allows them to run Edge with elevated privileges without automatically de-elevating the process.
Screenshot of a warning message displayed when launching Microsoft Edge with the
--do-not-de-elevate flag enabled:
For a more in-depth explanation of this feature, check out this article on Sandboxing vs. Elevated Browsing (As Administrator).
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)
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
Above command disables the new download experience of Edge Chromium.
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
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=*/edge_dual_engine/*=3
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.
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
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"