I notice that NODE_DEBUG are more explicit than DEBUG, but why they are 2 environnements variables for debug, and how do I decide which to choose?
Thanks for responses.
NODE_DEBUG
is used by built in util.debuglog
. This is used by all nodejs builtin core modules and all the third party packages that decide to use it.
DEBUG
is used by debug
module. So if you are using any package that is using this module for logging, then you need to use DEBUG
.
So depending on which modules you are trying to debug you may need to use one of them or both.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With