File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -70,22 +70,44 @@ Here are some examples:
7070<img width =" 647 " alt =" screen shot 2017-08-08 at 12 53 38 pm " src =" https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png " >
7171<img width =" 647 " alt =" screen shot 2017-08-08 at 12 53 25 pm " src =" https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png " >
7272
73- #### Windows note
73+ #### Windows command prompt notes
74+
75+ ##### CMD
7476
7577On Windows the environment variable is set using the ` set ` command.
7678
7779``` cmd
7880set DEBUG=*,-not_this
7981```
8082
81- Note that PowerShell uses different syntax to set environment variables.
83+ Example:
84+
85+ ``` cmd
86+ set DEBUG=* & node app.js
87+ ```
88+
89+ ##### PowerShell (VS Code default)
90+
91+ PowerShell uses different syntax to set environment variables.
8292
8393``` cmd
8494$env:DEBUG = "*,-not_this"
8595```
8696
97+ Example:
98+
99+ ``` cmd
100+ $env:DEBUG='app';node app.js
101+ ```
102+
87103Then, run the program to be debugged as usual.
88104
105+ npm script example:
106+ ``` js
107+ " windowsDebug" : " @powershell -Command $env:DEBUG='*';node app.js" ,
108+
109+ ```
110+
89111
90112## Namespace Colors
91113
You can’t perform that action at this time.
0 commit comments