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

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

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

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-04 18:12

    My response is fairly late. I faced the same problem. I am on Windows 10. This is what I did:

    • Open a new Command prompt (CMD.EXE)
    • Set the environment variables . set myvar1=myvalue1
    • Launch VS Code from that Command prompt by typing code and then press ENTER
    • VS code was launched and it inherited all the custom variables that I had set in the parent CMD window

    Optionally, you can also use the Control Panel -> System properties window to set the variables on a more permanent basis

    Hope this helps.

提交回复
热议问题