Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #7065: cli help documentation for --debug and --debug-brk #7086

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,20 @@ added: v0.11.14

Throw errors for deprecations.

### `--debug=<port>`
<!-- YAML
added: v6.2.0
-->

listen for debugger commands on user specified port. If port is not specified e.g `--debug` then use 5858 as default.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long line (80 columns max) and sentences should be properly capitalized. The version number is not correct but I don't really remember when they were added.


### `--debug-brk=<port>`
<!-- YAML
added: v6.2.0
-->

same as --debug but break on first line waiting for a client to connect.

### `--no-warnings`
<!-- YAML
added: v6.0.0
Expand Down
4 changes: 4 additions & 0 deletions doc/api/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ process or via URI reference to the listening debugger:
* `node debug -p <pid>` - Connects to the process via the `pid`
* `node debug <URI>` - Connects to the process via the URI such as
localhost:5858
* `node --debug` - Enables debugging and accept commands on tcp port 5858.
* `node --debug-port=<port>` - Changes the connection port. e.g. `--debug-port=9000`
* `node --debug-brk` - Breaks on the first line and wait for a debugger client to connect .
* `node --debug-brk=<port>` - Break on first line and listen on a custom port.

## V8 Inspector Integration for Node.js

Expand Down
8 changes: 8 additions & 0 deletions doc/node.1
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ Print stack traces for deprecations.
.BR \-\-throw\-deprecation
Throw errors for deprecations.

.TP
.BR \-\-debug
listen for debugger commands on a tcp connection.

.TP
.BR \-\-debug\-brk
same as --debug but break on first line.

.TP
.BR \-\-no\-warnings
Silence all process warnings (including deprecations).
Expand Down
5 changes: 3 additions & 2 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3463,8 +3463,9 @@ static void PrintHelp() {
" -r, --require module to preload (option can be repeated)\n"
" --no-deprecation silence deprecation warnings\n"
" --trace-deprecation show stack traces on deprecations\n"
" --throw-deprecation throw an exception anytime a deprecated "
"function is used\n"
" --throw-deprecation throw an exception anytime a deprecated function is used\n"
" --debug listen for debugger commands on a tcp connection\n"
" --debug-brk same as --debug but break on first line\n"
" --no-warnings silence all process warnings\n"
" --trace-warnings show stack traces on process warnings\n"
" --trace-sync-io show stack trace when use of sync IO\n"
Expand Down