expressjs.com
expressjs.com copied to clipboard
How to set debug mode on Windows?
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?
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
okay
Going to close out this old issue.