--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 开发者工具和 IDE 等工具调试和分析 Node.js 实例。这些工具通过 tcp 端口连接到 Node.js 实例,并使用 Chrome DevTools 协议 进行通信。有关 Node.js 调试器的进一步说明,请参阅 Node.js 的 V8 Inspector 集成

¥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.