File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -4276,6 +4276,29 @@ documentation for the [`'warning'` event][process_warning] and the
42764276[` emitWarning ()` method][process_emit_warning] for more information about this
42774277flag's behavior.
42784278
4279+ ## ` process .traceProcessWarnings `
4280+
4281+ <!-- YAML
4282+ added: v6.10.0
4283+ -->
4284+
4285+ * {boolean}
4286+
4287+ The ` process .traceProcessWarnings ` property indicates whether the ` -- trace- warnings` flag
4288+ is set on the current Node.js process. This property allows programmatic control over the
4289+ tracing of warnings, enabling or disabling stack traces for warnings at runtime.
4290+
4291+ ` ` ` js
4292+ // Enable trace warnings
4293+ process .traceProcessWarnings = true ;
4294+
4295+ // Emit a warning with a stack trace
4296+ process .emitWarning (' Warning with stack trace' );
4297+
4298+ // Disable trace warnings
4299+ process .traceProcessWarnings = false ;
4300+ ` ` `
4301+
42794302## ` process .umask ()`
42804303
42814304<!-- YAML
You can’t perform that action at this time.
0 commit comments