Skip to content

Commit 3af9101

Browse files
gibfahnitaloacasas
authored andcommitted
doc, inspector: note that the host is optional
Document that `node --inspect=${port}` is also a viable option. PR-URL: #12149 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b52b3f6 commit 3af9101

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

doc/api/cli.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Follows `require()`'s module resolution
9494
rules. `module` may be either a path to a file, or a node module name.
9595

9696

97-
### `--inspect[=host:port]`
97+
### `--inspect[=[host:]port]`
9898
<!-- YAML
9999
added: v6.3.0
100100
-->
@@ -106,7 +106,7 @@ and profile Node.js instances. The tools attach to Node.js instances via a
106106
tcp port and communicate using the [Chrome Debugging Protocol][].
107107

108108

109-
### `--inspect-brk[=host:port]`
109+
### `--inspect-brk[=[host:]port]`
110110
<!-- YAML
111111
added: v7.6.0
112112
-->

doc/node.1

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ Preload the specified module at startup. Follows `require()`'s module resolution
9393
rules. \fImodule\fR may be either a path to a file, or a node module name.
9494

9595
.TP
96-
.BR \-\-inspect \fI[=host:port]\fR
96+
.BR \-\-inspect \fI[=[host:]port]\fR
9797
Activate inspector on host:port. Default is 127.0.0.1:9229.
9898

9999
V8 Inspector integration allows attaching Chrome DevTools and IDEs to Node.js
100100
instances for debugging and profiling. It uses the Chrome Debugging Protocol.
101101

102102
.TP
103-
.BR \-\-inspect-brk \fI[=host:port]\fR
103+
.BR \-\-inspect-brk \fI[=[host:]port]\fR
104104
Activate inspector on host:port and break at start of user script.
105105

106106
.TP

src/node.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -3481,9 +3481,10 @@ static void PrintHelp() {
34813481
" -r, --require module to preload (option can be "
34823482
"repeated)\n"
34833483
#if HAVE_INSPECTOR
3484-
" --inspect[=host:port] activate inspector on host:port\n"
3484+
" --inspect[=[host:]port] activate inspector on host:port\n"
34853485
" (default: 127.0.0.1:9229)\n"
3486-
" --inspect-brk[=host:port] activate inspector on host:port\n"
3486+
" --inspect-brk[=[host:]port]\n"
3487+
" activate inspector on host:port\n"
34873488
" and break at start of user script\n"
34883489
#endif
34893490
" --no-deprecation silence deprecation warnings\n"

0 commit comments

Comments
 (0)