From 20a2fe097f7b6aeed947fca19c23ecf0b347dd77 Mon Sep 17 00:00:00 2001 From: KyleStay Date: Fri, 8 Jun 2018 07:51:01 -0400 Subject: [PATCH 1/2] Improve usability of Windows notes w/ examples for prompts & npm script --- README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a3b70bf..8495fd15 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,9 @@ Here are some examples: screen shot 2017-08-08 at 12 53 38 pm screen shot 2017-08-08 at 12 53 25 pm -#### Windows note +#### Windows command prompt notes + +##### CMD On Windows the environment variable is set using the `set` command. @@ -78,14 +80,34 @@ On Windows the environment variable is set using the `set` command. 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 From 84eb0b0300f4612f076e7e2accc11bbc8929394e Mon Sep 17 00:00:00 2001 From: KyleStay Date: Wed, 20 Jun 2018 18:16:19 -0400 Subject: [PATCH 2/2] Made changes requested for pull request https://github.com/visionmedia/debug/pull/577#pullrequestreview-130549763 --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 8495fd15..b9f4b49a 100644 --- a/README.md +++ b/README.md @@ -105,10 +105,8 @@ Then, run the program to be debugged as usual. npm script example: ```js "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", - ``` - ## Namespace Colors Every debug instance has a color generated for it based on its namespace name.