Edge cheat sheet
Sep 3, 2021

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.


msedge.exe --user-data-dir=c:\temp\NewEdgeUser

The --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.


The --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 --user-data-dir flag.


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.



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


msedge.exe --disable-features=msDownloadsHub

Above command disables the new download experience of Edge Chromium.


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


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=*/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.

Comprehensive logging for in-depth Edge debugging

msedge.exe --enable-logging --vmodule=*=4 about:blank

When tackling complex issues in Microsoft Edge, pinpointing the exact source of the problem can sometimes feel like searching for a needle in a haystack. To streamline the debugging process, I've adopted a comprehensive logging approach that ensures no stone is left unturned.

This powerful command initiates Edge with a heightened level of verbosity, capturing a detailed log of all system activities. By setting --vmodule=*=4, we instruct Edge to record verbose logs from all modules at level 4, which is verbose enough to uncover even the most elusive issues. Log will be saved as chrome_debug.log under User Data Directory.


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


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"


Privacy is a paramount concern for many users while browsing the internet. Microsoft Edge addresses this need with the --inprivate flag, which allows users to initiate the browser in an InPrivate browsing mode.

msedge.exe --inprivate

Launching Edge with the --inprivate flag opens a new browser window with InPrivate mode activated by default. In this mode, Edge does not save any browsing history, cookies, site data, or information entered in forms. Temporary files and other browsing data are deleted after the InPrivate window is closed. This feature is especially useful when you are using a shared or public computer and do not want your browsing activity to be traceable by other users.


Microsoft Edge