Is there any way to set environment variables in Visual Studio Code?

前端 未结 8 1184
眼角桃花
眼角桃花 2020-12-04 17:26

Could you please help me, how to setup environment variables in visual studio code?

8条回答
  •  甜味超标
    2020-12-04 18:05

    In the VSCode launch.json you can use "env" and configure all your environment variables there:

    {
        "version": "0.2.0",
        "configurations": [
            {           
                "env": {
                    "NODE_ENV": "development",
                    "port":"1337"
                },
                ...
            }
        ]
    }
    

提交回复
热议问题