How to extend $PATH in launch.json in Visual Studio Code?

后端 未结 3 945
难免孤独
难免孤独 2021-02-08 01:34

I have some shell scripts, which I would like to execute by name from code during debugging in Visual Studio Code. I need to extend $PATH environment variable to make it happene

3条回答
  •  梦如初夏
    2021-02-08 02:36

    I finally gave up on making that work, but the workaround I have done is to just paste the DOS command to set the path in the terminal before a debugging session. Something like:

    set PATH=C:\Python27\Lib\site-packages\pywin32_system32;%PATH%
    

    A little bit ugly, but at least it lets me work. I add that as a comment to my launch.json so I have it readily available. Not completely sure that would transfer cleanly for your Linux environment, but worth a try (with the appropriate syntax changes for the shell you are using, of course).

提交回复
热议问题