Incognito Debugging With Any Browser in Visual Studio
Disclaimer: I imported this post from WordPress to Jekyll on 9/2/23. Forgive the misformatting until I get a chance to clean it up.
Clearing the Cruft
When I develop web applications in Visual Studio, I often need to resolve issues that are
dependent on the state of the cache or cookies. By default, debugging in a browser from Visual Studio
opens a new browser window but does not purge any preexisting cache or cookies.
Private/Incognito Browsing: Always Fresh
I like to configure Visual Studio to launch browser debug sessions in incognito/private browsing mode. Every debugging
session is then fresh as if a user was visiting my application for the first time.
To configure browsers to debug in this mode:
Click the Debug Target control’s right-side chevron to view the list of installed browsers.
Click “Browse With…”.
Configure the new target browser using the private/incognito command line argument. See the examples below.