【发布时间】:2018-05-19 16:01:38
【问题描述】:
我有一些 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
}
我也试过了
"env": {
"PATH": "${env.PATH}:$(pwd)/../bin/"
},
但是,它不起作用。如何在 Visual Studio Code 的 launch.json 中扩展 $PATH 环境变量?
【问题讨论】:
标签: debugging visual-studio-code