Is there a way to determine if my Nightmare script is running with debugging output?
For example, to launch Nightmare with debug output, I'd use:
DEBUG=nightmare node myscript.js
; otherwise, I'd use node myscript.js
Within myscript.js
, how can I determine if the script is running with DEBUG=nightmare
?
You can use process.env.DEBUG
to get DEBUG
's value.