Skip to content

doc: Document the --stack-trace-limit cli flag. #6377

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

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
5 changes: 5 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ Print stack traces for process warnings (including deprecations).
Prints a stack trace whenever synchronous I/O is detected after the first turn
of the event loop.

### `--stack-trace-limit=N`

Sets the number of lines shown in a stack trace. `N` can be any Javascript
number. Defaults to 10.


### `--zero-fill-buffers`

Expand Down
3 changes: 2 additions & 1 deletion doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ collected by a stack trace (whether generated by `new Error().stack` or
`Error.captureStackTrace(obj)`).

The default value is `10` but may be set to any valid JavaScript number. Changes
will affect any stack trace captured *after* the value has been changed.
will affect any stack trace captured *after* the value has been changed. The
property may also be set on the command line with the flag `--stack-trace-limit`.

If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.
Expand Down