You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable extension developer setting in Chrome automatically in dev mode #137
When running wxt to develop and extension, it's really annoying to have to enable developer mode every time to inspect the different JS contexts of your extension. We should be able to enable it automatically via CLI flags? I assume the switch is just a preference that we can control via CLI flags.
Also a problem with Edge, so we should add the setting to edge and other chromium browsers as well. Hopefully they're all the same internal preference...
Reacted by Brian Zhou, Manabu Nakazawa, Patryk Kuniczak and sanzenwin
Can't pass the custom chromiumLaunch into the JS API... Need to wait for web-ext to add support, or add the feature to my fork. I'd rather contribute this to web-ext though.
@aklinker1 bumping into this issue repeatedly too! Did you end up figuring out what the new preference is? I'm ok with manually setting it via chromiumPrefs.
@hzuo@aklinker1 bumped into this issue trying to figure out where the pref is, seemingly it is in "Secure Preferences" file now instead of "Preferences"
bumped into this issue trying to figure out where the pref is, seemingly it is in "Secure Preferences" file now instead of "Preferences"
Lovely. I won't get to this for a while, it's a change required on web-ext. Someone else is free to open a PR. But this has changed some much I closed my old PR for regular preferences.
I had been seeing issues when WXT tried to live-update the service worker: the extension would just disappear! I realized that it would become disabled because developer mode wasn't enabled. (I'm using Windows.)
After enabling browser profile persistence, each time I would use npm run dev I wouldn't even see the changes in the browser! I finally realized that this was the same issue: Chrome wasn't reloading the extension because it had gotten "stuck" because developer mode wasn't turned on, and this "stuck" state was now persisted.
Once I turned on developer mode manually, using browser profile persistence seems to keep it on and everything is updating now.
In summary it would be nice if WXT would turn on developer mode automatically, but using browser profile persistence is a workaround (still requiring manually to select developer mode once). Something about this might be helpful in the docs.
@aklinker1 We are able to solve this issue in some way?
Maybe you are able to finish your work on PR in web-ext, now it has more sense to make it one more time, instead of rebase on this closed one.
But anyway are you even consider to do it, or you have other plan to give possibility to our users to enable this option?
I'm not going to continue this work. Chrome has changed where the value is stored multiple times now, breaking WXT each time. I'm not gonna fight against that 🤷 Gotta pick your battles.
If someone else wants to maintain this feature, feel free to continue where I left off on my web-ext PR.
Activity
aklinker1 commentedon Sep 30, 2023
This doesn't seem possible. But you can enable it for all profiles, including new ones that WXT creates during dev mode:
https://stackoverflow.com/questions/32280949/enable-developer-mode-extension-for-chrome-browser-using-cmd#answer-32284345
aklinker1 commentedon Sep 30, 2023
I kept looking into this, and it is possible, but it's blocked by GoogleChrome/chrome-launcher#323.
web-extallows passing a customchromeLaunchoption, which I can use to apply custom prefs.wxt/src/core/runners/web-ext.ts
Line 56 in 89d15ba
https://github.com/mozilla/web-ext/blob/a83f4c55a8fe0d2323d2d17ffbfa1754ec32f49c/src/extension-runners/chromium.js#L43
aklinker1 commentedon Oct 3, 2023
Can't pass the custom
chromiumLaunchinto the JS API... Need to wait forweb-extto add support, or add the feature to my fork. I'd rather contribute this toweb-extthough.mozilla/web-ext#2899
aklinker1 commentedon Nov 22, 2024
This appears to be broken again
aklinker1 commentedon Nov 22, 2024
Need to figure out what the new preference is. Old preference:
https://github.com/wxt-dev/web-ext-run/blob/a5d1e24b528911eb3b7d93439c45cc30094682be/src/extension-runners/chromium.js#L34-L36
Here's where we can set the new one if we find it:
wxt/packages/wxt/src/core/runners/web-ext.ts
Lines 96 to 108 in 90bb145
hzuo commentedon Jan 9, 2025
@aklinker1 bumping into this issue repeatedly too! Did you end up figuring out what the new preference is? I'm ok with manually setting it via chromiumPrefs.
aklinker1 commentedon Jan 9, 2025
Nope, when I looked at the preferences file there was no flag that appeared to change when toggling the setting.
gb-jos commentedon May 22, 2025
@hzuo @aklinker1 bumped into this issue trying to figure out where the pref is, seemingly it is in "Secure Preferences" file now instead of "Preferences"
PatrykKuniczak commentedon Aug 15, 2025
That's really annoying, we need to fix it :)
aklinker1 commentedon Sep 3, 2025
Lovely. I won't get to this for a while, it's a change required on
web-ext. Someone else is free to open a PR. But this has changed some much I closed my old PR for regular preferences.You can refer to this PR for reference: mozilla/web-ext#2912
garretwilson commentedon Sep 16, 2025
I had been seeing issues when WXT tried to live-update the service worker: the extension would just disappear! I realized that it would become disabled because developer mode wasn't enabled. (I'm using Windows.)
After enabling browser profile persistence, each time I would use
npm run devI wouldn't even see the changes in the browser! I finally realized that this was the same issue: Chrome wasn't reloading the extension because it had gotten "stuck" because developer mode wasn't turned on, and this "stuck" state was now persisted.Once I turned on developer mode manually, using browser profile persistence seems to keep it on and everything is updating now.
In summary it would be nice if WXT would turn on developer mode automatically, but using browser profile persistence is a workaround (still requiring manually to select developer mode once). Something about this might be helpful in the docs.
PatrykKuniczak commentedon Feb 9, 2026
@aklinker1 We are able to solve this issue in some way?
Maybe you are able to finish your work on PR in web-ext, now it has more sense to make it one more time, instead of rebase on this closed one.
But anyway are you even consider to do it, or you have other plan to give possibility to our users to enable this option?
aklinker1 commentedon Feb 9, 2026
I'm not going to continue this work. Chrome has changed where the value is stored multiple times now, breaking WXT each time. I'm not gonna fight against that 🤷 Gotta pick your battles.
If someone else wants to maintain this feature, feel free to continue where I left off on my
web-extPR.PatrykKuniczak commentedon May 23, 2026
@aklinker1 It's released already:
https://github.com/mozilla/web-ext/releases/tag/10.2.0
But i can't bump it, because we're using https://github.com/wxt-dev/web-ext-run
But you have a plan to migrate from it, to
web-extdirectly, when you'll do this, this feature will be implemented.aklinker1 commentedon Jun 28, 2026
Gonna do a major release soon, #2447, will be fixed in that. We're adding
web-extas a peer, dropping my forkweb-ext-run.PatrykKuniczak commentedon Jun 29, 2026
@aklinker1 Good to hear.
I've tried my best and use a part of your work, to make it possible ❤️