diff options
author | legendecas <legendecas@gmail.com> | 2019-11-17 15:02:01 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-12-17 00:05:53 +0300 |
commit | 6859fcf6f7c0710508b2a1f461043547e8a85acc (patch) | |
tree | 48d417ae1d782815a2eed65f71f9a099a6d21cfa /doc | |
parent | 024b6588313a0e32595317936ee279dec7a5a756 (diff) |
cli: add --trace-exit cli option
It could be convenient to trace abnormal exit of the Node.js processes
that printing stacktrace on each `process.exit` call with a cli option.
This also takes effects on worker threads.
PR-URL: https://github.com/nodejs/node/pull/30516
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/cli.md | 9 | ||||
-rw-r--r-- | doc/node.1 | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md index 171f6b8ad29..745d274e0cc 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -784,6 +784,14 @@ added: v7.7.0 Enables the collection of trace event tracing information. +### `--trace-exit` +<!-- YAML +added: REPLACEME +--> + +Prints a stack trace whenever an environment is exited proactively, +i.e. invoking `process.exit()`. + ### `--trace-sync-io` <!-- YAML added: v2.1.0 @@ -1112,6 +1120,7 @@ Node.js options that are allowed are: * `--trace-event-categories` * `--trace-event-file-pattern` * `--trace-events-enabled` +* `--trace-exit` * `--trace-sync-io` * `--trace-tls` * `--trace-uncaught` diff --git a/doc/node.1 b/doc/node.1 index 5ea38be56e9..255f6746abf 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -355,6 +355,10 @@ and .It Fl -trace-events-enabled Enable the collection of trace event tracing information. . +.It Fl -trace-exit +Prints a stack trace whenever an environment is exited proactively, +i.e. invoking `process.exit()`. +. .It Fl -trace-sync-io Print a stack trace whenever synchronous I/O is detected after the first turn of the event loop. . |