Skip to content

帮助文档

导出命令行帮助文档。

.\code -h > code_help.txt
Visual Studio Code CLI Standalone - *.*.* (commit ****)

Usage: code [options][paths...]

To read output from another program, append '-' (e.g. 'echo Hello World | code -')
Running editor commands requires installing Visual Studio Code, and may differ slightly.

Commands:
  tunnel     Create a tunnel that's accessible on vscode.dev from anywhere. Run `code tunnel --help` for more usage info
  ext        Manage editor extensions
  status     Print process usage and diagnostics information
  version    Changes the version of the editor you're using
  serve-web  Runs a local web version of Visual Studio Code
  update     Updates the CLI
  help       Print this message or the help of the given subcommand(s)

Arguments:
  [paths]...  One or more files, folders, or URIs to open

Options:
  -h, --help     Print help
  -V, --version  Print version

EDITOR OPTIONS:
  -d, --diff <file> <file>
          Compare two files with each other
  -a, --add <folder>
          Add folder(s) to the last active window
  -g, --goto <file:line[:character]>
          Open a file at the path on the specified line and character position
  -n, --new-window
          Force to open a new window
  -r, --reuse-window
          Force to open a file or folder in an
  -w, --wait
          Wait for the files to be closed before returning
      --locale <locale>
          The locale to use (e.g. en-US or zh-TW)
      --enable-proposed-api <ext-id>
          Enables proposed API features for extensions. Can receive one or more extension IDs to enable individually
      --extensions-dir <dir>
          Set the root path for extensions
      --user-data-dir <dir>
          Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of the editor
      --use-version <stable | insiders | x.y.z | path>
          Sets the editor version to use for this command. The preferred version can be persisted with `code version use <version>`. Can be "stable", "insiders", a version number, or an absolute path to an existing install

EDITOR TROUBLESHOOTING:
      --prof-startup                   Run CPU profiler during startup
      --disable-extensions             Disable all installed extensions
      --disable-extension <ext-id>     Disable an extension
      --sync <on | off>                Turn sync on or off [possible values: on, off]
      --inspect-extensions <port>      Allow debugging and profiling of extensions. Check the developer tools for the connection URI
      --inspect-brk-extensions <port>  Allow debugging and profiling of extensions with the extension host being paused after start. Check the developer tools for the connection URI
      --disable-gpu                    Disable GPU hardware acceleration
      --telemetry                      Shows all telemetry events which the editor collects

GLOBAL OPTIONS:
      --cli-data-dir <CLI_DATA_DIR>  Directory where CLI metadata should be stored [env: VSCODE_CLI_DATA_DIR=]
      --verbose                      Print verbose output (implies --wait)
      --log <level>                  Log level to use [possible values: trace, debug, info, warn, error, critical, off]

联系 math@baima.site