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.
Which type of project are you debugging?
To configure Visual Studio to launch the browser with your 'work' profile you'll need to:
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"
Elin's answer will launch the browser with the default profile. However, if your goal is to launch in a specific profile, then you should use the --profile-directory
argument.
You can find the profile directory for any profile using the PowerShell snippet below. It will list all Edge profiles by profile name and folder name.
$EdgeProfiles = gci "$env:LOCALAPPDATA\Microsoft\Edge\User Data\" -Filter "Profile*"
ForEach($EdgeProfile in $EdgeProfiles.Name) {
$Preferences = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\$EdgeProfile\Preferences"
$Data = (ConvertFrom-Json (Get-content $Preferences -Raw))
$profileName = $Data.Profile.Name
"$profileName,$EdgeProfile"
}
Then the argument textbox in Visual Studio would contain this text:
--profile-directory="Profile 4"
assuming that the profile you wish the launch with is in the Profile 4
folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With