microsoft / vscode-azure-iot-edge

Azure IoT Edge for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-edge
Other
51 stars 36 forks source link
azure-iot azure-iot-edge azure-iothub iot vscode-extension

Azure IoT Edge for Visual Studio Code

Gitter

Announcement

The Azure IoT Visual Studio Code extension is in a maintenance mode. Please see this announcement for more details. We recommend using the command line steps to develop edge modules over VSCode extensions.

Overview

Azure IoT Edge extension makes it easy to code, build, deploy, and debug your IoT Edge solutions in Visual Studio Code, by providing a rich set of functionalities:

Added

What's New (v1.25.11)

What's New (v1.25.10)

What's New (v1.25.9)

What's New (v1.25.8)

What's New (v1.25.0)

What's New (v1.22.0)

Changed

Known Issues

Prerequisites for Azure IoT Edge extension

You need to install prerequisites below to make Azure IoT Edge extension work:

Prerequisites for specific language

To develop IoT Edge modules you also need to install following prerequisites for specific language:

C# module prerequisites

Quickstart

Click the links below to learn how to develop, debug and deploy IoT Edge modules.

FAQ

Q: All too often, I forget to save a config file, and when I build the docker image. Can we auto-save files before build?

A: By default, VS Code requires an explicit action to save your changes to disk, Ctrl+S. However, it's easy to turn on Auto Save

Q: How to work with Python virtual environment?

A: The Python extension manages your virtual environments in the workspace folder. Please refer to Environments and Automatic Activation of Environments in the Terminal for details.

Q: Help me understand IoT Edge deployment manifest.

A: Learn how to use deployment manifests to deploy modules and establish routes

Q: If I run this extension on Linux (e.g. Ubuntu), when executing docker commands (e.g. the Build IoT Edge Module Image command), the terminal shows permission denied errors. How can I fix this, and avoid having to prefix every command manually with sudo?

A: This extension assumes the current user has sufficient privileges to run docker commands. On Linux you can add the current user to the docker group by executing the following commands:

  • To create the group: sudo groupadd docker
  • To add the current user to it: sudo usermod -aG docker $USER

After executing these commands exit your Terminal session and restart Docker (sudo systemctl restart docker). Or you can reboot the machine completely. Check the Post-installation steps for Linux in the Docker documentation for more information on how to manage Docker as a non-root user.

Commands

Press F1 or Ctrl + Shift + P to open command palette, type Azure IoT Edge: to see all the commands:

You can also trigger following frequently-used commands in context menu.

Code Snippets

Trigger Content
edgeModule Add IoT Edge module in IoT Edge deployment manifest
edgeRoute Add IoT Edge route in IoT Edge deployment manifest

Resources

Supported Operating Systems

Currently this extension supports the following operating systems:

The extension might work on other Linux distros as some users have reported, but be aware that Microsoft provides no guarantee or support for such installations. You can find Azure IoT Edge support here.

TypeEdge (Experimental)

The Azure IoT TypeEdge introduces a strongly-typed flavor of the inherently loosely coupled vanilla Azure IoT Edge. We would like to invite you to try TypeEdge out and give us any feedback or recommendations you might have here. TypeEdge is still an experimental project that we don’t recommend to use it in production IoT Edge project.

To get started, please visit the project repo and give us feedback via Github Issues.

Data/Telemetry

This project collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you don’t wish to send usage data to Microsoft, you can set the telemetry.enableTelemetry setting to false. Learn more in our FAQ.

Support and Contact Us

You can join in our Gitter to ask for help, report issues and talk to the product team directly.