How to use browser Incognito Mode in visual studio when Run a web project

Sazal Das picture Sazal Das · Jun 14, 2016 · Viewed 17.1k times · Source

enter image description here

If i Run the project, it will launch using Google Chrome normal mode. But how can i launch it using Google Chrome Incognito Mode ?

Answer

Arif picture Arif · Jun 14, 2016

It is very simple using visual studio 2015 / 2017 / 2019. You just need to add --incognito as command line switch and name the browser something like Google Chrome - Incognito.

That you can do using Browse With.. option in visual Studio.

Step-1:

Step-2:


Note: You can do the same thing with Firefox and Internet Explorer. Here I'm adding Internet Explorer with the -private option.

For
Google Chrome : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --incognito
Firefox : "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -private-window
Internet Explorer/Microsoft Edge : "C:\Program Files\Internet Explorer\iexplore.exe" -private