I am continuously trying to do it, I have read almost all the solutions available on the stack overflow regarding this topic but none of the solution is working.
I have set the environment variable in windows and the variable has bees set I have confirmed that by using console.log(). but the debug is not working I am pasting the code: //this is the js code
const debug = require('debug')('test');
debug('hello');
//this is the command I used in cmd
setx DEBUG test
SUCCESS: Specified value was saved.