This is the extension for VSCode that enables Meadow apps to be build, debugged and deployed to a Meadow device.
Supported Operating Systems
We tested this extension on the following operating systems:
- Linux (Ubuntu)
Using the Extension
- In VSCode go to the Extensions tab (macOS: Cmd+Shift+X. Others: Ctrl+Shift+X)
- In the search bar type
VSCode Tools for Meadow. It should be the 1st extension in the list.
- Click it the
Install button on the bottom right of the listed item.
- The extension should now be installed.
It should look similar to this:
Manual Installation of Alpha/Beta CI builds
- Download the alpha/beta extension (.vsix file) from our latest GitHub CI.
- In VSCode go to the Extensions tab (macOS:
- click the
... menu and choose Install from VSIX....
- Pick the file you downloaded to install.
Create a new Meadow Project
In a terminal:
dotnet new install WildernessLabs.Meadow.Template
Create and/or navigate into a directory with the name of your new app (ie:
dotnet new Meadow
Alternatively, you can also specify the folder where your new project will go directly by appending the
dotnet new Meadow --output MyNewMeadowApp
Building and Deploying your Meadow App in VSCode
- Ensure your Meadow board is plugged in, and up to date.
- Open your new app's folder in VSCode.
- Any attached devices should appear in the Run and Debug list
- Choose Run -> Start Debugging (short-cut:
F5) (Your code will automagically be built first).
- If you have move than 1 Meadow device attached, you will be prompted to pick a serial port/device to deploy to. If you have only have 1 Meadow device attached it will use that automagically.
- Watch the output in the Terminal and Debug Console tabs, as your app is deployed!
- You will be able to set breakpoints and debug your Meadow App.
You may need to add a
global.json file to your project's directory to tell it to use .NET 6.0:
Refresh the attached device list
You can refresh the list of attached devices by using the following short-cut on:
- macOS use:
- Other platforms use:
or search for the select device command by pressing
Ctrl+Shift+P and typing "Meadow" when prompted
Toggle the Build Configuration
You can toggle the project's build configuration, using the
Toggle Build Configuraton button on the bottom status bar, to toggle between Debug and Release builds:
You can also use the following short-cut on:
- macOS use:
- Other platforms use:
Building the Extension and Contributing
Then run the following commands on the command line, once NPM is installed
With all the listed pre-requisites installed, run
npm i to ensure all of the packages are installed and up to date for the project.
- Be sure to checkout this repo with submodules:
git clone --recurse-submodules email@example.com:WildernessLabs/VSCode_Meadow_Extension.git
- Meadow.CLI repo must be cloned adjacent to this checkout.
Building the Extension
The extension has 2 parts. There is a client, which is written in TypeScript and a server which is writtne in C#.
- Open the extension folder VSCode.
- Got to Run and Debug (macOS:
You can choose the
Debug Extension + Server option in the debug menu in VSCode to debug both parts at the same time.
This will launch the server process in debug listening mode.
You will be able to set breakpoints in the host instance of VSCode and debug the TypeScript extension.
This does not allow you to debug the arbitrary commands sent to the vscode-meadow.exe process from the extension for things like getting a list of devices. This will only allow you to debug the code path of a VSCode instance starting a Deploy/Debug session.
Debugging just the TypeScript Extension
Debug Extension from the Debug menu in VSCode and run it.
- Open a meadow project in the new instance of VSCode which now includes the extension.
You can set breakpoints in the host instance of VSCode and debug the TypeScript.
To produce a VSIX for the VSCode extension:
Copyright 2023, Wilderness Labs Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Having trouble building/running these projects?
- File an issue with a repro case to investigate, and/or
- Join our public Slack, where we have an awesome community helping, sharing and building amazing things using Meadow.