How to programmatically detect debug mode in nodejs?
NodeJS creates a v8debug global object when running in debug mode: node debug script.js So, a possible solution would be: var debug = typeof v8debug === ‘object’; For my use case, I use it because I want to avoid passing environment variables. My main node process starts child node processes and I want a node … Read more