Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set debug mode on Windows? #1445

Open
minhuaMS opened this issue Oct 26, 2023 · 2 comments
Open

How to set debug mode on Windows? #1445

minhuaMS opened this issue Oct 26, 2023 · 2 comments

Comments

@minhuaMS
Copy link

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?

@yangjunjun
Copy link

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

@dkk2901
Copy link

dkk2901 commented Feb 19, 2024

okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants