inspector.open([port[, host[, wait]]])
-
port
<number> 监听检查器连接的端口。可选的。默认值:CLI 上指定的内容。¥
port
<number> Port to listen on for inspector connections. Optional. Default: what was specified on the CLI. -
host
<string> 主机监听检查器连接。可选的。默认值:CLI 上指定的内容。¥
host
<string> Host to listen on for inspector connections. Optional. Default: what was specified on the CLI. -
wait
<boolean> 在客户端连接之前阻塞。可选的。默认值:false
。¥
wait
<boolean> Block until a client has connected. Optional. Default:false
. -
返回:<Disposable> 调用
inspector.close()
的一次性产品。¥Returns: <Disposable> A Disposable that calls
inspector.close()
.
在主机和端口上激活检查器。相当于 node --inspect=[[host:]port]
,但可以在 node 启动后以编程方式完成。
¥Activate inspector on host and port. Equivalent to
node --inspect=[[host:]port]
, but can be done programmatically after node has
started.
如果等待为 true
,则将阻塞直到客户端连接到检查端口并且流量控制已传给调试器客户端。
¥If wait is true
, will block until a client has connected to the inspect port
and flow control has been passed to the debugger client.
有关 host
参数用法,请参阅 安全警告。
¥See the security warning regarding the host
parameter usage.