To start the browser in private browsing mode, use the arguments below. Once you've added the browser configuration, you can now select it from the Start dropdown and Visual Studio will open your app using your selected configuration. The arguments will depend on which browser you want to use and how you want to start it (see Arguments section below). Paste the path you copied into 'Program' and give it a friendly name. Find the browser you want to use and copy the path to the executable shown in 'Program' (we'll need this in a moment). Here you should see the existing browser configurations that Visual Studio has automatically created based on your installed browsers. To create a new browser configuration, make sure your web project is set to be the start-up project in Visual Studio, then open the dropdown on the start button and select 'Browse with.'. In Visual Studio, you can create a new browser configuration using the command-line arguments and then use this when starting your web app. When debugging, I find I often want to use either a private browser session (so that cookies aren't persisted), or I'm logging in with test credentials that I do want to persist, but not necessarily on my default browser profile.įortunately, all the major browsers (Chrome, Edge, Firefox) support command-line arguments that allow you start them in private browsing mode or with a specified user profile. However, this will always default to using the default user profile for the selected browser. Visual Studio automatically detects your installed web browsers, and offers you a choice of which browser to fire up when you start up your web app. In this blog post I will explain how you can automatically open a web browser in either private browsing mode or with a custom user profile when debugging web applications from Visual Studio. By Mike Larah Software Engineer III 9th July 2020
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |