From f497ab2d6eb3512a30109ca6556da18d30480f68 Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Tue, 9 Jul 2024 08:42:08 -0400 Subject: [PATCH 1/3] cli: document `--inspect` port `0` behavior --- doc/api/cli.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index adc7e951f6114b..d613756cd21975 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1410,7 +1410,8 @@ or poisoning attack. 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 From 168fb2bc5f43b38e93d6b32f8f03c6e7fd7dc2c2 Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Tue, 9 Jul 2024 08:45:16 -0400 Subject: [PATCH 2/3] fixup! cli: document `--inspect` port `0` behavior --- doc/api/cli.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index d613756cd21975..fb32aff52ff6df 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1445,7 +1445,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. From 4d6549b4f117f6c1e021ab8ce04c5348d58280be Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Tue, 16 Jul 2024 09:45:06 -0400 Subject: [PATCH 3/3] Update cli.md --- doc/api/cli.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index fb32aff52ff6df..0ccb545ae21b94 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1459,7 +1459,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. @@ -1480,7 +1481,8 @@ added: --> 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.