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 @@ -4272,6 +4272,29 @@ documentation for the [`'warning'` event][process_warning] and the
42724272[` emitWarning ()` method][process_emit_warning] for more information about this
42734273flag's behavior.
42744274
4275+ ## ` process .traceProcessWarnings `
4276+
4277+ <!-- YAML
4278+ added: v6.10.0
4279+ -->
4280+
4281+ * {boolean}
4282+
4283+ The ` process .traceProcessWarnings ` property indicates whether the ` -- trace- warnings` flag
4284+ is set on the current Node.js process. This property allows programmatic control over the
4285+ tracing of warnings, enabling or disabling stack traces for warnings at runtime.
4286+
4287+ ` ` ` js
4288+ // Enable trace warnings
4289+ process .traceProcessWarnings = true ;
4290+
4291+ // Emit a warning with a stack trace
4292+ process .emitWarning (' Warning with stack trace' );
4293+
4294+ // Disable trace warnings
4295+ process .traceProcessWarnings = false ;
4296+ ` ` `
4297+
42754298## ` process .umask ()`
42764299
42774300<!-- YAML
You can’t perform that action at this time.
0 commit comments