1

I try to set up a launch.json for a vagrant-plugin on windows. My current version look like this:

{
    "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"
            }
        }
    ]
}

When starting the plugin now, vagrant misses the external dependencies. So I get the error:

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.

Adding the needed dependencies to my path sound like trouble (cp.exe, dir.exe, ...).

I tried:

        "env": {
            "PATH": "/HashiCorp/Vagrant/embedded/bin;${PATH}",
            "VAGRANT_CWD": "${workspaceRoot}/development"
        }

But then i get Debugger terminal error: Process failed: spawn rdebug-ide.bat ENOENT.

Is there a way the expend the PATH environment Variable in the launch.json?

Ben Harrison
  • 2,121
  • 4
  • 24
  • 40
sschoof
  • 1,531
  • 1
  • 17
  • 24

2 Answers2

0

@sschoof If you are trying to run VS Code from the windows host machine I'd suggest reading this post.

I've current just started configuring a development workspace for use with nodejs, VS Code, and Azure using my Mac OSX host. My solution is working but I have not a done a windows implementation so I currently cannot offer more experienced advice.

njappboy
  • 1,266
  • 13
  • 14
0

For the question of:

Is there a way the expend the PATH environment Variable in the launch.json?

From the documentation:

You can also reference environment variables through ${env.Name} (e.g. ${env.PATH}). Be sure to match the environment variable name's casing, for example env.Path on Windows.

At: http://code.visualstudio.com/docs/editor/tasks#_variable-substitution

For example I often use this for Ruby apps in my launch.json in Visual Studio Code:

...
"pathToBundler": "${env.HOME}/.rvm/gems/ruby-2.3.0/wrappers/bundle",
...
aaron blythe
  • 324
  • 1
  • 7