-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blazor WASM Debugging in VS launches Edge with a separate user data directory #20915
Comments
Thanks @anurse. |
As I understand it, it’s necessary to use a separate profile. Chromium browsers only support a single instance per profile directory, so if you already have a browser open then ask it to open a new one with different command line options (eg to open the debugging port) it will ignore the different options and continue using the existing instance. The only way we can be sure to enable debugging is either:
|
What @SteveSandersonMS said is correct. If you want to use your existing user data folder with your extensions and preference you'll have to close all existing browser instances before launching it from Visual Studio (you'll need to do this each time). To configure Visual Studio to launch the browser with your existing user data folder you'll need to:
|
Ugh. That feels like a really unpleasant user experience. I get the issues, but from a user experience side it feels really unsatisfactory. I’ve made it work (by logging in to the “alternate” profile) so I don’t really need to set up the new browser launch profile. I’m not sure most users would understand what’s going on here and why they don’t have any of their cookies and extensions. |
The 2 main restrictions that we have are: The only alternative I can think of to avoid that experience would be for the user to chose a fixed port for Chrome, and modify all Chrome shortcuts to always open debugging with that fixed port, and then modify VS to also use that port too. @anurse If you have any suggestions as to how we can improve the experience, we'd love to hear them :) |
Yeah, it certainly does seem like we’re stuck with what we’ve got :(. Maybe some way of notifying the user would help? And/or docs clarification? And of course we could see about filing a chromium bug but I’m not super hopeful about that being resolved any time soon (if at all :)). |
Let's wait and see how community feels about this. Moving this to the backlog (as a potential docs improvement). |
I followed these instructions and it worked for me. It would be really helpful, if this is documented in the debugging section. I would suggest to add another browser profile called "Microsoft Edge with Dev-Profile" or something. |
@mkArtakMSFT Blazor WASM debugging should open in a new tab of the already opened window of the browser like ASP.NET Core MVC, Razor Pages app. |
@guardrex could we please add some details to the debugging docs about how a new Edge/Chrome window with a separate "dev-profile" will be opened when debugging instead of opening a tab in your existing window? This is pretty low priority though 😄 |
This is in progress on dotnet/AspNetCore.Docs#23564. Capt. Safia is called for review. |
@rynowak told me to just file something here to start with :). I'm sure this lives somewhere else, like in VS.
If I launch a Blazor WASM app in VS with Ctrl-F5, I get a new tab opened in my existing Edge browser window and everything is nice. My extensions are present, and I'm properly signed in to Edge, you can see my profile picture in the top-right:
Cool cool cool cool.
Now, I launch with F5 to use the swanky new debugging features. Instead of a new tab, I get a new window. That's fine, I don't mind that. However, it's not signed in with my profile, so I don't get my extensions or existing cookies. This was annoying because I'm building an app that signs in to GitHub, and I didn't have my Github cookie or my password manager in order to log in again. Since I'm not signed in, my profile picture isn't in the top right:
I noticed that VS launched
msedge
with a--user-data-dir=C:\Users\anurse\AppData\Local\Microsoft\VisualStudio\16.0_019f56a0\WebTools\EdgeUserData_E906737D_E10E9004-4C41-47FB-B7F0-6B3B57970109
parameter which seems to be why it's not picking up my normal profiles. This seems odd to me :(.The text was updated successfully, but these errors were encountered: