From f7138344d82a95dd4659dbb80f19a5a73ffca7dd Mon Sep 17 00:00:00 2001 From: Cas_ <6506529+ThaUnknown@users.noreply.github.com> Date: Tue, 1 Jul 2025 23:31:49 +0200 Subject: [PATCH] docs: discoverability of chromium switches (#44947) * docs: document discoverability of chromium switches * docs: fixed typo * docs: reference chromium endorsed list of swithes * docs: reorder command-line-switches * fix: address review * fix: typo * fix: wording * Update command-line-switches.md fix: lint space * fix: Update docs/api/command-line-switches.md Co-authored-by: Keeley Hammond --------- Co-authored-by: Keeley Hammond --- docs/api/command-line-switches.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/api/command-line-switches.md b/docs/api/command-line-switches.md index 86f3c1a4b833..2496051b20a7 100644 --- a/docs/api/command-line-switches.md +++ b/docs/api/command-line-switches.md @@ -331,6 +331,22 @@ Affects the default output directory of [v8.setHeapSnapshotNearHeapLimit](https: Disable exposition of [Navigator API][] on the global scope from Node.js. +## Chromium Flags + +There isn't a documented list of all Chromium switches, but there are a few ways to find them. + +The easiest way is through Chromium's flags page, which you can access at `about://flags`. These flags don't directly match switch names, but they show up in the process's command-line arguments. + +To see these arguments, enable a flag in `about://flags`, then go to `about://version` in Chromium. You'll find a list of command-line arguments, including `--flag-switches-begin --your --list --flag-switches-end`, which contains the list of your flag enabled switches. + +Most flags are included as part of `--enable-features=`, but some are standalone switches, like `--enable-experimental-web-platform-features`. + +A complete list of flags exists in [Chromium's flag metadata page](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/flag-metadata.json), but this list includes platform, environment and GPU specific, expired and potentially non-functional flags, so many of them might not always work in every situation. + +Keep in mind that standalone switches can sometimes be split into individual features, so there's no fully complete list of switches. + +Finally, you'll need to ensure that the version of Chromium in Electron matches the version of the browser you're using to cross-reference the switches. + [app]: app.md [append-switch]: command-line.md#commandlineappendswitchswitch-value [debugging-main-process]: ../tutorial/debugging-main-process.md