From 3af9101d20a4afc1dbdb4dce5aa46535bbdeebf1 Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Tue, 28 Mar 2017 16:54:30 +0100 Subject: [PATCH] doc, inspector: note that the host is optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document that `node --inspect=${port}` is also a viable option. PR-URL: https://github.com/nodejs/node/pull/12149 Reviewed-By: Eugene Ostroukhov Reviewed-By: Richard Lau Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell --- doc/api/cli.md | 4 ++-- doc/node.1 | 4 ++-- src/node.cc | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index d5d4c4d6188c36..ab38065dae672e 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -94,7 +94,7 @@ Follows `require()`'s module resolution rules. `module` may be either a path to a file, or a node module name. -### `--inspect[=host:port]` +### `--inspect[=[host:]port]` @@ -106,7 +106,7 @@ and profile Node.js instances. The tools attach to Node.js instances via a tcp port and communicate using the [Chrome Debugging Protocol][]. -### `--inspect-brk[=host:port]` +### `--inspect-brk[=[host:]port]` diff --git a/doc/node.1 b/doc/node.1 index 5f79a0c809a3a4..6792349787d31c 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -93,14 +93,14 @@ Preload the specified module at startup. Follows `require()`'s module resolution rules. \fImodule\fR may be either a path to a file, or a node module name. .TP -.BR \-\-inspect \fI[=host:port]\fR +.BR \-\-inspect \fI[=[host:]port]\fR Activate inspector on host:port. Default is 127.0.0.1:9229. V8 Inspector integration allows attaching Chrome DevTools and IDEs to Node.js instances for debugging and profiling. It uses the Chrome Debugging Protocol. .TP -.BR \-\-inspect-brk \fI[=host:port]\fR +.BR \-\-inspect-brk \fI[=[host:]port]\fR Activate inspector on host:port and break at start of user script. .TP diff --git a/src/node.cc b/src/node.cc index 002ebd50500d13..19dfb0db19384f 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3481,9 +3481,10 @@ static void PrintHelp() { " -r, --require module to preload (option can be " "repeated)\n" #if HAVE_INSPECTOR - " --inspect[=host:port] activate inspector on host:port\n" + " --inspect[=[host:]port] activate inspector on host:port\n" " (default: 127.0.0.1:9229)\n" - " --inspect-brk[=host:port] activate inspector on host:port\n" + " --inspect-brk[=[host:]port]\n" + " activate inspector on host:port\n" " and break at start of user script\n" #endif " --no-deprecation silence deprecation warnings\n"