2014-08-15 05:06:52 +00:00
|
|
|
# Supported Chrome command line switches
|
|
|
|
|
|
|
|
Following command lines switches in Chrome browser are also Supported in
|
2014-08-20 02:53:20 +00:00
|
|
|
atom-shell, you can use [app.commandLine.appendSwitch][append-switch] to append
|
|
|
|
them in your app's main script before the [ready][ready] event of [app][app]
|
2014-08-15 05:06:52 +00:00
|
|
|
module is emitted:
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
var app = require('app');
|
2014-11-10 19:53:12 +00:00
|
|
|
app.commandLine.appendSwitch('remote-debugging-port', '8315');
|
2014-08-15 05:06:52 +00:00
|
|
|
app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1');
|
|
|
|
|
|
|
|
app.on('ready', function() {
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
2015-01-05 21:40:38 +00:00
|
|
|
## --disable-http-cache
|
|
|
|
|
|
|
|
Disables the disk cache for HTTP requests.
|
|
|
|
|
2014-08-15 05:06:52 +00:00
|
|
|
## --remote-debugging-port=`port`
|
|
|
|
|
|
|
|
Enables remote debug over HTTP on the specified `port`.
|
|
|
|
|
2014-08-20 03:57:15 +00:00
|
|
|
## --proxy-server=`address:port`
|
|
|
|
|
|
|
|
Uses a specified proxy server, overrides system settings. This switch only
|
|
|
|
affects HTTP and HTTPS requests.
|
|
|
|
|
|
|
|
## --no-proxy-server
|
|
|
|
|
|
|
|
Don't use a proxy server, always make direct connections. Overrides any other
|
|
|
|
proxy server flags that are passed.
|
|
|
|
|
2014-08-15 05:06:52 +00:00
|
|
|
## --host-rules=`rules`
|
|
|
|
|
|
|
|
Comma-separated list of `rules` that control how hostnames are mapped.
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
* `MAP * 127.0.0.1` Forces all hostnames to be mapped to 127.0.0.1
|
|
|
|
* `MAP *.google.com proxy` Forces all google.com subdomains to be resolved to
|
|
|
|
"proxy".
|
|
|
|
* `MAP test.com [::1]:77` Forces "test.com" to resolve to IPv6 loopback. Will
|
|
|
|
also force the port of the resulting socket address to be 77.
|
|
|
|
* `MAP * baz, EXCLUDE www.google.com` Remaps everything to "baz", except for
|
|
|
|
"www.google.com".
|
|
|
|
|
|
|
|
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).
|
|
|
|
|
|
|
|
## --host-resolver-rules=`rules`
|
|
|
|
|
|
|
|
Like `--host-rules` but these `rules` only apply to the host resolver.
|
|
|
|
|
2014-08-20 02:53:20 +00:00
|
|
|
[app]: app.md
|
|
|
|
[append-switch]: app.md#appcommandlineappendswitchswitch-value
|
|
|
|
[ready]: app.md#event-ready
|
2015-01-07 04:52:28 +00:00
|
|
|
|
|
|
|
## --ignore-certificate-errors
|
|
|
|
|
|
|
|
Ignore certificate related errors.
|
2015-03-25 12:21:56 +00:00
|
|
|
|
|
|
|
## --v=`log_level`
|
|
|
|
|
2015-03-26 03:27:06 +00:00
|
|
|
Gives the default maximal active V-logging level; 0 is the default. Normally
|
|
|
|
positive values are used for V-logging levels.
|
2015-03-25 12:21:56 +00:00
|
|
|
|
2015-03-26 03:27:06 +00:00
|
|
|
Passing `--v=-1` will disable logging.
|
2015-03-25 12:21:56 +00:00
|
|
|
|
|
|
|
## --vmodule=`pattern`
|
|
|
|
|
2015-03-26 03:27:06 +00:00
|
|
|
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*.*`.
|
2015-03-25 12:21:56 +00:00
|
|
|
|
2015-03-26 03:27:06 +00:00
|
|
|
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 source files under a `foo/bar` directory.
|
2015-03-25 12:21:56 +00:00
|
|
|
|
2015-03-26 03:27:06 +00:00
|
|
|
To disable all chromium related logs and only enable your application logs you
|
|
|
|
can do:
|
2015-03-25 12:21:56 +00:00
|
|
|
|
2015-03-26 03:27:06 +00:00
|
|
|
```javascript
|
2015-03-25 12:21:56 +00:00
|
|
|
app.commandLine.appendSwitch('v', -1);
|
|
|
|
app.commandLine.appendSwitch('vmodule', 'console=0');
|
|
|
|
```
|