我有一些shell脚本,我想在Visual Studio Code调试期间按名称从代码中执行。我需要扩展$ PATH环境变量以使其发生。目前,我在launch.json中关注json。
{
"name": "Debug-Linux",
"type": "go",
"request": "launch",
"mode": "debug",
"remotePath": "",
"port": 2345,
"host": "127.0.0.1",
"program": "${fileDirname}",
"env": {
"PATH": "$PATH:$(pwd)/../bin/"
},
"showLog": true
}
Run Code Online (Sandbox Code Playgroud)
我也试过了
"env": {
"PATH": "${env.PATH}:$(pwd)/../bin/"
},
Run Code Online (Sandbox Code Playgroud)
但是,它不起作用。如何在Visual Studio Code中的launch.json中扩展$ PATH环境变量?