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