File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -70,22 +70,42 @@ Here are some examples:
70
70
<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 " >
71
71
<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 " >
72
72
73
- #### Windows note
73
+ #### Windows command prompt notes
74
+
75
+ ##### CMD
74
76
75
77
On Windows the environment variable is set using the ` set ` command.
76
78
77
79
``` cmd
78
80
set DEBUG=*,-not_this
79
81
```
80
82
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.
82
92
83
93
``` cmd
84
94
$env:DEBUG = "*,-not_this"
85
95
```
86
96
97
+ Example:
98
+
99
+ ``` cmd
100
+ $env:DEBUG='app';node app.js
101
+ ```
102
+
87
103
Then, run the program to be debugged as usual.
88
104
105
+ npm script example:
106
+ ``` js
107
+ " windowsDebug" : " @powershell -Command $env:DEBUG='*';node app.js" ,
108
+ ```
89
109
90
110
## Namespace Colors
91
111
You can’t perform that action at this time.
0 commit comments