Skip to content
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

Pass in custom chromium prefs (enable developer mode by default) #2899

Open
aklinker1 opened this issue Oct 3, 2023 · 3 comments · May be fixed by #2912
Open

Pass in custom chromium prefs (enable developer mode by default) #2899

aklinker1 opened this issue Oct 3, 2023 · 3 comments · May be fixed by #2912
Assignees

Comments

@aklinker1
Copy link
Contributor

aklinker1 commented Oct 3, 2023

Is this a feature request or a bug?

Feature request.

What is the current behavior?

Currently, web-ext uses chrome-launcher@0.15.1, but v1.1.0 was just released, with a fix to make the prefs option work. This enables us to set custom preferences for the profile, including extensions.ui.developer_mode, which would enable developer mode by default when using web-ext, which is super convenient during development.

import { launch } from 'chrome-launcher';

launch({
  prefs: {
    extensions: {
      ui: {
        developer_mode: true,
      },
    },
  },
});

What is the expected or desired behavior?

Just like the --pref for firefox, it would be awesome if we could add --chromium-pref to the CLI and chromiumPrefs to the JS API. Or at least enable extensions.ui.developer_mode by default. I always have to toggle the setting when developing an extension before debugging the background in chrome.

This might also be a solution for #2874.

I'd be happy to submit a PR, but I can't get tests to pass after upgrading chrome-launcher, there's a error with the watcher that I can't figure out :/

Version information (for bug reports)

  • Firefox version: deved 119.0b2
  • Your OS and version: MacOS Ventura 13.4.1c
  • Paste the output of these commands:
v18.16.1
9.5.1 
7.8.0
@Rob--W
Copy link
Member

Rob--W commented Oct 3, 2023

Neat. I am supportive of setting this flag by default.

If you have something almost working, you could also create a PR and ask for feedback.

@aklinker1
Copy link
Contributor Author

Nice, I wanted to make sure this was something that would be accepted before I put any more work into it. I'll open a PR sometime soon.

@aklinker1 aklinker1 linked a pull request Oct 15, 2023 that will close this issue
@aklinker1
Copy link
Contributor Author

@Rob--W I got the tests working! PR opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants