# 支持的 Chrome 命令行开关
-这页列出了Chrome浏览器和Electron支持的命令行开关. 你也可以在[app][app]模块的[ready][ready]事件发出之前使用[app.commandLine.appendSwitch][append-switch] 来添加它们到你应用的main脚本里面:
+> Electron 支持的命令行开关。
+
+你可以在 [app][app] 模块的 [ready][ready] 事件发出之前使用 [app.commandLine.appendSwitch][append-switch] 来添加它们到你应用的 main 脚本里面:
```javascript
-const app = require('electron').app
+const {app} = require('electron')
app.commandLine.appendSwitch('remote-debugging-port', '8315')
app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1')
-app.on('ready', function () {
+app.on('ready', () => {
// Your code here
})
```
## --js-flags=`flags`
-指定引擎过渡到 JS 引擎.
+指定引擎过渡到 JS 引擎.
在启动Electron时,如果你想在主进程中激活 `flags` ,它将被转换.
[append-switch]: app.md#appcommandlineappendswitchswitch-value
[ready]: app.md#event-ready
[play-silent-audio]: https://github.com/atom/atom/pull/9485/files
+[debugging-main-process]: ../tutorial/debugging-main-process.md
+[node-cli]: https://nodejs.org/api/cli.html