From 137a2e576627eed4363c6779516426aca0e6d5c1 Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Thu, 18 Jul 2024 10:28:44 -0400 Subject: [PATCH] cli: document `--inspect` port `0` behavior PR-URL: https://github.com/nodejs/node/pull/53782 Reviewed-By: Kohei Ueno --- doc/api/cli.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index dcdb0b2c67899e..1812b41f327235 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1330,7 +1330,8 @@ accepted. Avoid using this option. added: v6.3.0 --> -Activate inspector on `host:port`. Default is `127.0.0.1:9229`. +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 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 @@ -1364,7 +1365,8 @@ added: v7.6.0 --> Activate inspector on `host:port` and break at start of user script. -Default `host:port` is `127.0.0.1:9229`. +Default `host:port` is `127.0.0.1:9229`. If port `0` is specified, +a random available port will be used. See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger. @@ -1377,7 +1379,8 @@ added: v7.6.0 Set the `host:port` to be used when the inspector is activated. Useful when activating the inspector by sending the `SIGUSR1` signal. -Default host is `127.0.0.1`. +Default host is `127.0.0.1`. If port `0` is specified, +a random available port will be used. See the [security warning][] below regarding the `host` parameter usage. @@ -1396,7 +1399,8 @@ added: v20.15.0 --> Activate inspector on `host:port` and wait for debugger to be attached. -Default `host:port` is `127.0.0.1:9229`. +Default `host:port` is `127.0.0.1:9229`. If port `0` is specified, +a random available port will be used. See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger.