Skip to content

Commit 1ad1e4a

Browse files
KyleStayQix-
authored andcommitted
Improve usability of Windows notes w/ examples for prompts & npm script (#577)
* Improve usability of Windows notes w/ examples for prompts & npm script * Made changes requested for pull request #577 (review)
1 parent 71d2aa7 commit 1ad1e4a

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,42 @@ 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

7577
On Windows the environment variable is set using the `set` command.
7678

7779
```cmd
7880
set 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+
87103
Then, 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+
```
89109

90110
## Namespace Colors
91111

0 commit comments

Comments
 (0)