Skip to content

Commit

Permalink
Improve usability of Windows notes w/ examples for prompts & npm scri…
Browse files Browse the repository at this point in the history
…pt (#577)

* Improve usability of Windows notes w/ examples for prompts & npm script

* Made changes requested for pull request

#577 (review)
  • Loading branch information
KyleStay authored and Qix- committed Jun 20, 2018
1 parent 71d2aa7 commit 1ad1e4a
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,42 @@ Here are some examples:
<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">
<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">

#### Windows note
#### Windows command prompt notes

##### CMD

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

```cmd
set DEBUG=*,-not_this
```

Note that PowerShell uses different syntax to set environment variables.
Example:

```cmd
set DEBUG=* & node app.js
```

##### PowerShell (VS Code default)

PowerShell uses different syntax to set environment variables.

```cmd
$env:DEBUG = "*,-not_this"
```

Example:

```cmd
$env:DEBUG='app';node app.js
```

Then, run the program to be debugged as usual.

npm script example:
```js
"windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
```

## Namespace Colors

Expand Down

0 comments on commit 1ad1e4a

Please sign in to comment.