microsoft-edgevisual-studio-2022

How do I select Edge profile launched when debugging in Visual Studio 2022


Is there a way to tell Visual Studio 2022 which Edge profile to launch when debugging a docker app?

They seem to have removed the "Browse With" option that let you define a new browser with parameters and only allow you select Edge, Chrome, Firefox, etc. with not parameters.

My default profile is "Work", which uses the new Edge for business but Visual Studio keeps launching my personal profile. This is problematic as all my saved passwords that I need to use when debugging are in the "Work" profile.


Solution

  • Which type of project are you debugging?

    To configure Visual Studio to launch the browser with your 'work' profile you'll need to:

    1. Go to the Browse with... option: (Can you see this option? )

    enter image description here

    1. Click Add... a new browser:

    enter image description here

    1. Configure the path to your browser, and use a custom --user-data-dir argument pointing to your user data folder

    enter image description here
    In my PC they are:

    C:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe --user-data-dir="C:\Users\AppData\local\Microsoft\Edge Beta\User Data"

    1. And then optionally set it as the Default browser if you choose to.
    2. Browse with your 'work' profile.