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 @@ -3827,6 +3827,29 @@ documentation for the [`'warning'` event][process_warning] and the
38273827[` emitWarning ()` method][process_emit_warning] for more information about this
38283828flag's behavior.
38293829
3830+ ## ` process .traceProcessWarnings `
3831+
3832+ <!-- YAML
3833+ added: v6.10.0
3834+ -->
3835+
3836+ * {boolean}
3837+
3838+ The ` process .traceProcessWarnings ` property indicates whether the ` -- trace- warnings` flag
3839+ is set on the current Node.js process. This property allows programmatic control over the
3840+ tracing of warnings, enabling or disabling stack traces for warnings at runtime.
3841+
3842+ ` ` ` js
3843+ // Enable trace warnings
3844+ process .traceProcessWarnings = true ;
3845+
3846+ // Emit a warning with a stack trace
3847+ process .emitWarning (' Warning with stack trace' );
3848+
3849+ // Disable trace warnings
3850+ process .traceProcessWarnings = false ;
3851+ ` ` `
3852+
38303853## ` process .umask ()`
38313854
38323855<!-- YAML
You can’t perform that action at this time.
0 commit comments