diff --git a/doc/api/cli.md b/doc/api/cli.md index e03773d1e71dd0..1bcd7664258279 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -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` diff --git a/doc/api/errors.md b/doc/api/errors.md index bb83ef1320a25d..066cfb4d27d84a 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -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.