Supported Chrome command line switches

This page lists the command line switches used by the Chrome browser that are also supported by Electron. You can use app.commandLine.appendSwitch to append them in your app's main script before the ready event of app module is emitted:

const app = require('electron').app;
app.commandLine.appendSwitch('remote-debugging-port', '8315');
app.commandLine.appendSwitch('host-rules', 'MAP *');

app.on('ready', function() {
  // Your code here


Sets the path of client certificate file.


Ignore the connections limit for domains list separated by ,.


Disables the disk cache for HTTP requests.


Enables remote debugging over HTTP on the specified port.


Specifies the flags passed to JS engine. It has to be passed when starting Electron if you want to enable the flags in the main process.

$ electron --js-flags="--harmony_proxies --harmony_collections" your-app


Use a specified proxy server, which overrides the system setting. This switch only affects requests with HTTP protocol, including HTTPS and WebSocket requests. It is also noteworthy that not all proxy servers support HTTPS and WebSocket requests.


Instructs Electron to bypass the proxy server for the given semi-colon-separated list of hosts. This flag has an effect only if used in tandem with --proxy-server.

For example:

app.commandLine.appendSwitch('proxy-bypass-list', '<local>;*;*;')`

Will use the proxy server for all hosts except for local addresses (localhost, etc.), subdomains, hosts that contain the suffix and anything at


Uses the PAC script at the specified url.


Don't use a proxy server and always make direct connections. Overrides any other proxy server flags that are passed.


A comma-separated list of rules that control how hostnames are mapped.

For example:

  • MAP * Forces all hostnames to be mapped to
  • MAP * proxy Forces all subdomains to be resolved to "proxy".
  • MAP [::1]:77 Forces "" to resolve to IPv6 loopback. Will also force the port of the resulting socket address to be 77.
  • MAP * baz, EXCLUDE Remaps everything to "baz", except for "".

These mappings apply to the endpoint host in a net request (the TCP connect and host resolver in a direct connection, and the CONNECT in an HTTP proxy connection, and the endpoint host in a SOCKS proxy connection).


Like --host-rules but these rules only apply to the host resolver.


Ignores certificate related errors.


Sets the path of the pepper flash plugin.


Sets the version of the pepper flash plugin.


Enables net log events to be saved and writes them to path.


Sets the minimum SSL/TLS version ("tls1", "tls1.1" or "tls1.2") that TLS fallback will accept.


Specify comma-separated list of SSL cipher suites to disable.


Prints Chromium's logging into console.

This switch can not be used in app.commandLine.appendSwitch since it is parsed earlier than user's app is loaded, but you can set the ELECTRON_ENABLE_LOGGING environment variable to achieve the same effect.


Gives the default maximal active V-logging level; 0 is the default. Normally positive values are used for V-logging levels.

This switch only works when --enable-logging is also passed.


Gives the per-module maximal V-logging levels to override the value given by --v. E.g. my_module=2,foo*=3 would change the logging level for all code in source files my_module.* and foo*.*.

Any pattern containing a forward or backward slash will be tested against the whole pathname and not just the module. E.g. */foo/bar/*=2 would change the logging level for all code in the source files under a foo/bar directory.

This switch only works when --enable-logging is also passed.