--inspect[=[host:]port]


host:port 上激活检查器。默认值是 127.0.0.1:9229。如果指定端口为 0,将使用一个随机可用端口。

【Activate inspector on host:port. Default is 127.0.0.1:9229. If port 0 is specified, a random available port will be used.】

V8 检查器集成允许诸如 Chrome DevTools 和 IDE 等工具调试和分析 Node.js 实例。这些工具通过 TCP 端口附加到 Node.js 实例并使用 Chrome 开发者工具协议 进行通信。有关 Node.js 调试器的更多说明,请参阅 Node.js 的 V8 检查器集成

【V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug and profile Node.js instances. The tools attach to Node.js instances via a tcp port and communicate using the Chrome DevTools Protocol. See V8 Inspector integration for Node.js for further explanation on Node.js debugger.】