我尝试在 Windows 上为 vagrant-plugin 设置launch.json。我当前的版本如下所示:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Vagrant",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/vagrant",
"args": ["up"],
"env": {
"VAGRANT_CWD": "${workspaceRoot}/development"
}
}
]
}
现在启动插件时,vagrant 错过了外部依赖项。所以我得到了错误:
The executable 'curl' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.
将所需的依赖项添加到我的路径听起来很麻烦(cp.exe
, dir.exe
, ...)。
我试过了:
"env": {
"PATH": "/HashiCorp/Vagrant/embedded/bin;${PATH}",
"VAGRANT_CWD": "${workspaceRoot}/development"
}
但后来我明白了Debugger terminal error: Process failed: spawn rdebug-ide.bat ENOENT
。
有没有办法在launch.json中扩展PATH环境变量?