Skip to content

Commit 66f7c59

Browse files
avivkellertargos
authored andcommitted
cli: document --inspect port 0 behavior
PR-URL: #53782 Reviewed-By: Kohei Ueno <[email protected]>
1 parent 8e66a18 commit 66f7c59

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/api/cli.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,8 @@ or poisoning attack. Avoid using this option.
14481448
added: v6.3.0
14491449
-->
14501450

1451-
Activate inspector on `host:port`. Default is `127.0.0.1:9229`.
1451+
Activate inspector on `host:port`. Default is `127.0.0.1:9229`. If port `0` is
1452+
specified, a random available port will be used.
14521453

14531454
V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug
14541455
and profile Node.js instances. The tools attach to Node.js instances via a
@@ -1482,7 +1483,8 @@ added: v7.6.0
14821483
-->
14831484

14841485
Activate inspector on `host:port` and break at start of user script.
1485-
Default `host:port` is `127.0.0.1:9229`.
1486+
Default `host:port` is `127.0.0.1:9229`. If port `0` is specified,
1487+
a random available port will be used.
14861488

14871489
See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger.
14881490

@@ -1495,7 +1497,8 @@ added: v7.6.0
14951497
Set the `host:port` to be used when the inspector is activated.
14961498
Useful when activating the inspector by sending the `SIGUSR1` signal.
14971499

1498-
Default host is `127.0.0.1`.
1500+
Default host is `127.0.0.1`. If port `0` is specified,
1501+
a random available port will be used.
14991502

15001503
See the [security warning][] below regarding the `host`
15011504
parameter usage.
@@ -1514,7 +1517,8 @@ added: v22.2.0
15141517
-->
15151518

15161519
Activate inspector on `host:port` and wait for debugger to be attached.
1517-
Default `host:port` is `127.0.0.1:9229`.
1520+
Default `host:port` is `127.0.0.1:9229`. If port `0` is specified,
1521+
a random available port will be used.
15181522

15191523
See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger.
15201524

0 commit comments

Comments
 (0)