doc: document --trace-promises - #65199
Open
tomass22 wants to merge 1 commit into
Open
Conversation
`--trace-promises` has been available since v21.5.0 but was never added to the CLI documentation. Instead it was added to the list of intentionally undocumented options in test/parallel/test-process-env-allowed-flags-are-documented.js. Unlike the other entries in that list, which are either legacy no-ops or internal-only debugging switches, `--trace-promises` is a user-facing diagnostic flag that is allowed in NODE_OPTIONS, and its siblings `--trace-env`, `--trace-uncaught` and `--trace-warnings` are all documented. Document it in doc/api/cli.md, regenerate doc/node.1 accordingly, and drop the two exemptions from the test. Assisted-by: Claude Opus 5 (1M context) Signed-off-by: tomass22 <dominanthat@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--trace-promiseshas been available since v21.5.0 (backported to v20.12.0 in#50899) but has never been documented.
src/node_options.ccwithkAllowedInEnvvar, so it is alsousable through
NODE_OPTIONSsrc/env.ccasEnvironment::TracePromises, installed as anisolate-wide promise hook in
src/node.ccdoc/api/cli.mdanddoc/node.1When the flag landed, it was added to the "intentionally undocumented options"
list in
test/parallel/test-process-env-allowed-flags-are-documented.jsinsteadof being documented:
I believe that was an oversight rather than a deliberate decision. The other
entries in that list fall into two groups:
--experimental-fetch,--experimental-global-webcrypto,--experimental-report,--experimental-worker,--napi-modules,--es-module-specifier-resolution--debug-arraybuffer-allocations,--verify-base-objects,--node-snapshot--trace-promisesis neither. It is a user-facing diagnostic flag in the samefamily as
--trace-env,--trace-uncaughtand--trace-warnings, all of whichare documented.
This PR:
doc/api/cli.md, both as a###section and in theNODE_OPTIONSallow-listdoc/node.1withmake node.1No new test is needed. Removing the exemptions makes the existing
test-process-env-allowed-flags-are-documentedtest cover this flag — it failswithout the documentation change.
Refs: #50899