-
Notifications
You must be signed in to change notification settings - Fork 82
Webdev serve: add an option to pass user data directory to chrome #1491
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
Webdev serve: add an option to pass user data directory to chrome #1491
Conversation
Webdev launches chrome using temp profile by default, so the users cannot use their extensions while debugging. Allow launching chrome in a window that is signed in as the user's default profile. Notes: There seems to be a limitation in chrome that only uses the existing session with --user-data-dir. The existing session cannot open a debug port that dwds needs. To work around this issue, we copy the default profile to a temp directory, and pass it to chrome. That seems to work, but takes time to copy the profile. Issue a performance warning in that case. Note that subsequent updates will only update modified files, so the performance hit becomes smaller over time. Closes: dart-lang#1490
…low_chrome_user_data_dir
…grin/webdev into annagrin/allow_chrome_user_data_dir
@elliette @grouma I revived my old work on webdev to enable users to login into their chrome account and have access to extensions (ie debug extension). This includes updating the browser_launcher package and code in webdev to copy users directory. We can also use PR as example for other places where dwds is used. |
I would hope that the user wouldn't need to pass the data dir. Instead |
I am not sure yet (need to figure out how to do that for linux and macos) so I'd prefer this to be done in a separate PR. |
@grouma Looked into adding automatic detection, it looked simple so added it to the same PR. Let's see if the tests would work in the CI. |
Webdev launches chrome using temp profile by default, so the users
cannot use their extensions while debugging. Allow launching chrome
in a window that is signed in as the user's default profile.
Notes:
There seems to be a limitation in chrome - it only uses the existing
session with --user-data-dir. The existing session cannot open a debug
port that dwds needs.
To work around this issue, we copy the default profile to a temporary
directory, and pass it to chrome. That seems to work, but takes time
to copy the profile. Issue a performance warning in that case.
Note that subsequent updates will only update modified files, so the
performance hit becomes smaller over time.
Closes: #1490