expressjs.com icon indicating copy to clipboard operation
expressjs.com copied to clipboard

How to set debug mode on Windows?

Open minhuaMS opened this issue 1 year ago • 2 comments

In the document, it says:

On Windows, use the corresponding command.

set DEBUG=express:* & node index.js

But when I run the command above in Windows Powershell or VS Code terminal, the error message: Set-Variable : A positional parameter cannot be found that accepts argument 'node'. At line:1 char:1

  • set DEBUG=express:* `& node --experimental-json-modules index.js
  •   + CategoryInfo          : InvalidArgument: (:) [Set-Variable], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetVariableCommand
    
    

Tried all the approaches I could find on Stackoverflow, no luck yet. Any suggestion?

minhuaMS avatar Oct 26 '23 00:10 minhuaMS

try this

# windows powershell
$ $env:DEBUG="express:*"; node .\index.js
# windows cmd 
$ set debug=express:* && node index.js
# linux/Mac OS
$ DEBUG=express:* node index.js

yangjunjun avatar Nov 23 '23 01:11 yangjunjun

okay

dkk2901 avatar Feb 19 '24 11:02 dkk2901

Going to close out this old issue.

chrisdel101 avatar Jun 09 '24 18:06 chrisdel101