VCF Automation – Build Tools for VMware Aria – Visual Studio Code Integration
The Build Tools for VMware Aria project has developed an Extension for Visual Studio Code that provides native integration directly in the IDE. Using VSCode with this extension will provide the following features when developing code for your VCF Automation environment:
- Change active profile (environment switching);
- Create projects;
- Intellisense support (caveats!);
- Browse and fetch Orchestrator content;
- Run Javascript Actions (more caveats);
I have had quite a few issues with the plugin and found that it provides limited support. The biggest benefit of using the Build Tools is that the code can be managed in VSCode to begin with.
Contents
Install vRealize Developer Tools extension for Visual Studio Code
The vRealize Developer Tools extension for Visual Studio Code can be installed from the VS Marketplace.
Restart Visual Studio Code after the extension has been installed, as I had issues when I didn’t do this.
You will also need to ensure that the extension uses the same version as your projects. Click the cog icon on the vRealize Develop Tools extension page and select ‘Extension Settings‘.

On the Extension Settings page, change the Build Tools Default Version to the desired version (or use the latest, in my case, 4.2.1).

To access all of the available commands provided by the plugin, open the command pallet and search for ‘vrealize’.

Change Active Profile
The command ‘vRealize: Change Active Profile‘ can be used to change the active profile, i.e. the active connection to a VCF Automation and VCF Automation Orchestrator instance.

Profiles are those that have been defined in the maven settings.xml file.
If you need to view content from a specific environment, then changing the active profile is handy. Other than this, I don’t see any other use case.
Create Projects
The command ‘vRealize: New Project‘ can be used to create new Build Tools supported projects. The projects that you can create are covered in part 2 of this series VCF Automation – Build Tools for VMware Aria – Overview of VCF Automation Projects.

Select the project that you are interested in. I have selected vRO JavaScript-based in this example.
Provide the group ID (com.simplygeek in my example)

Provide a name for the project (vro-javascript in my example)

You will be prompted where to create the new project. In my example, I have a root folder called ‘vcf-automation’ where this project will be created.
A new VSCode window will open the new project.

You can now create the JavaScript content in this new project.
Intellisense Support
Intellisense support is provided for JavaScript actions via the vRO Language Server provided by the vRDT plugin. However, this has one major caveat: Only plain text username and password authentication is supported (in settings.xml). This means that if you use refresh tokens, this feature will not work.
The code completion feature will allow any Orchestrator plugins or built-in wrapper classes to be detected within the IDE. In the example below using System.getModule
you can see that module paths within my environment have been detected and displayed.

Here is another example using the ActiveDirectory plugin.

However, no information is provided about the parameters required.
I don’t find this feature particularly useful, and not having support for refresh tokens is a deal-breaker. If the vRO language server is updated in the future, I will update this section.
Browse and Fetch Orchestrator Content
This feature of the extension is what I have found to be the most useful. On the left-hand panel of VSCode will be an icon for vRealize Developer Tools. This allows content on Orchestrator to be explored and also provides the capability to fetch remote content.

Below is an example of content being explored with a remote Workflow displayed in the IDE:

Below is another example of a remote Action being displayed in the IDE:

What I really like about this example is that the Action is transpiled when it is displayed in the IDE.
Finally, one more example displaying the Orchestrator inventory:

Run Javascript Actions
For a vRO JavaScript-based project, it is possible to run Actions directly from the IDE. When an Action is opened, an icon is visible in the top right side of the editor that looks like a lightning bolt.

But there is a catch: Actions with parameters are not supported (apparently, this will be coming in a future version of the vRDT extension). When running such an Action, the output similar to the below is displayed:

There is no output, and the Action didn’t actually run because the parameters were not provided.
A workaround for this would be to create a temporary JS file that acts as a wrapper for the Action you wish to run. This does have the limitation that the Action you want to run must already be present on Orchestrator (has been pushed from the local repository to the Orchestrator instance).
To demonstrate this, I have created an Action called ‘runActionWithParams‘ in Orchestrator that accepts two parameters, x and y, and prints these to the console. I have created a wrapper JavaScript file locally to run this Action

Which has the following output:

This is another feature which I feel has limited need, and it’s easier to run the Actions within the Orchestrator appliance.
Other commands
Any command made available with the vRDT extension that I have not covered in this post is because they did not work in my environment.
I hope this has provided some insight into the vRealize Developer Tools extension, if you have had different experiences or if you feel there is something I have missed that you find useful, than please comment and share.