When working on web projects it can be useful to make use of the browsers Incognito/Private Browsing/InPrivate mode. The major reason is that the browser does not cache content or cookies between sessions when running in these modes.
For reasons I
needed wanted to be able to use Edge in InPrivate mode for debugging. And found little information. And all the information I could find about entering InPrivate mode talked me through doing it in the UI. Mmm-hmmm.
Searching around the subject I turned up this gem:
C:\Windows\System32\cmd.exe /c start shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge -private
Hardly the most discoverable… thing in the world ever.
Microsoft have come a long way recently, making things more open (.NET Core, Powershell) and being open to being open (WSL). And then they go and do something like that.
But fear not, we can work with this. On the start debug button drop the menu and select Browse With…. In the dialog that pops up click Add…. On the Add Program set these values:
/c start shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge -private
- Friendly name:
Microsoft Edge InPrivate
After this you will be able to debug with Edge in InPrivate mode. A couple of warnings:
- You will briefly see a console window flash up when starting debugging.
- When starting Edge will initially not look like it is in InPrivate mode, the chrome will then update to have the blue InPrivate flash.