diff --git a/README.md b/README.md index 1eac7ed..6f687bd 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,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. @@ -84,14 +86,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: + +```javascript + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + ## Namespace Colors Every debug instance has a color generated for it based on its namespace name.