Skip to content

Commit 3d019ce

Browse files
authored
cli: document --inspect port 0 behavior
PR-URL: #53782 Reviewed-By: Kohei Ueno <[email protected]>
1 parent efe5b81 commit 3d019ce

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
@@ -1452,7 +1452,8 @@ or poisoning attack. Avoid using this option.
14521452
added: v6.3.0
14531453
-->
14541454

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

14571458
V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug
14581459
and profile Node.js instances. The tools attach to Node.js instances via a
@@ -1486,7 +1487,8 @@ added: v7.6.0
14861487
-->
14871488

14881489
Activate inspector on `host:port` and break at start of user script.
1489-
Default `host:port` is `127.0.0.1:9229`.
1490+
Default `host:port` is `127.0.0.1:9229`. If port `0` is specified,
1491+
a random available port will be used.
14901492

14911493
See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger.
14921494

@@ -1499,7 +1501,8 @@ added: v7.6.0
14991501
Set the `host:port` to be used when the inspector is activated.
15001502
Useful when activating the inspector by sending the `SIGUSR1` signal.
15011503

1502-
Default host is `127.0.0.1`.
1504+
Default host is `127.0.0.1`. If port `0` is specified,
1505+
a random available port will be used.
15031506

15041507
See the [security warning][] below regarding the `host`
15051508
parameter usage.
@@ -1520,7 +1523,8 @@ added:
15201523
-->
15211524

15221525
Activate inspector on `host:port` and wait for debugger to be attached.
1523-
Default `host:port` is `127.0.0.1:9229`.
1526+
Default `host:port` is `127.0.0.1:9229`. If port `0` is specified,
1527+
a random available port will be used.
15241528

15251529
See [V8 Inspector integration for Node.js][] for further explanation on Node.js debugger.
15261530

0 commit comments

Comments
 (0)