--trace-env


将有关在当前 Node.js 实例中对环境变量的任何访问的信息打印到 stderr,包括:

¥Print information about any access to environment variables done in the current Node.js instance to stderr, including:

  • 环境变量读取 Node.js 在内部执行的操作。

    ¥The environment variable reads that Node.js does internally.

  • process.env.KEY = "SOME VALUE" 的形式写入。

    ¥Writes in the form of process.env.KEY = "SOME VALUE".

  • process.env.KEY 的形式读取。

    ¥Reads in the form of process.env.KEY.

  • Object.defineProperty(process.env, 'KEY', {...}) 形式的定义。

    ¥Definitions in the form of Object.defineProperty(process.env, 'KEY', {...}).

  • Object.hasOwn(process.env, 'KEY')process.env.hasOwnProperty('KEY')'KEY' in process.env 的形式进行查询。

    ¥Queries in the form of Object.hasOwn(process.env, 'KEY'), process.env.hasOwnProperty('KEY') or 'KEY' in process.env.

  • delete process.env.KEY 形式的删除。

    ¥Deletions in the form of delete process.env.KEY.

  • 枚举 inf 的形式为 ...process.envObject.keys(process.env)

    ¥Enumerations inf the form of ...process.env or Object.keys(process.env).

仅打印正在访问的环境变量的名称。不打印值。

¥Only the names of the environment variables being accessed are printed. The values are not printed.

要打印访问的堆栈跟踪,请使用 --trace-env-js-stack 和/或 --trace-env-native-stack

¥To print the stack trace of the access, use --trace-env-js-stack and/or --trace-env-native-stack.