This repository was archived by the owner on Dec 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -76,22 +76,44 @@ Here are some examples:
7676<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 " >
7777<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 " >
7878
79- ### Windows note
79+ ### Windows command prompt notes
80+
81+ #### CMD
8082
8183On Windows the environment variable is set using the ` set ` command.
8284
8385``` cmd
8486set DEBUG=*,-not_this
8587```
8688
87- Note that PowerShell uses different syntax to set environment variables.
89+ Example:
90+
91+ ``` cmd
92+ set DEBUG=* & node app.js
93+ ```
94+
95+ #### PowerShell (VS Code default)
96+
97+ PowerShell uses different syntax to set environment variables.
8898
8999``` cmd
90100$env:DEBUG = "*,-not_this"
91101```
92102
103+ Example:
104+
105+ ``` cmd
106+ $env:DEBUG='app';node app.js
107+ ```
108+
93109Then, run the program to be debugged as usual.
94110
111+ npm script example:
112+
113+ ``` javascript
114+ " windowsDebug" : " @powershell -Command $env:DEBUG='*';node app.js" ,
115+ ```
116+
95117## Namespace Colors
96118
97119Every debug instance has a color generated for it based on its namespace name.
You can’t perform that action at this time.
0 commit comments