

The following steps will show you how to setup a specific bundle for development with VSCode. vscode/settings.json file in the bundle (similar to tasks.json/ launch.json below).ĭownload settings.json (opens new window) for the recommended settings (or simply wish to copy the URLs in the above image). You can also define them local to a specific bundle by putting those lines in the. If you want to setup openHAB code formatting guidelines, add the following to the VSCode settings:Įither globally define the formatting options via Files->Preferences->Settings->Extensions->Java configuration (or in the global settings.json). vscode/settings.json file in the bundle (similar to tasks.json/ launch.json below). "": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"Įither globally define the options via the global settings.json. If not configured already, add the following to the VSCode settings: On Windows, VSCode should be configured to use powershell instead of the classic command line.

Install Java Extension Pack for VSCode ( (opens new window))Ĭlone the addons ( (opens new window) or preferably your own fork) to %BASE%\openhab-addons The following steps will only need to be done once to setup both VSCode and your environment. This guide assumes you have a base development directory already defined (example: c:/users/me/development) and will reference that directory as %BASE%. Please note that the instructions show a Win10 system but should be similar for macOS/Linux. The following shows the steps for building a bundle using Visual Studio Code (VSCode). Advanced Functionality and Administrative Tasks.
