Exercise - Set up your development environment

Completed

To use Visual Studio Code for Azure development, you'll need to install Visual Studio Code locally and one or more Azure extensions. In this exercise, we'll add the Azure App Service extension.

Install Visual Studio Code

To install Visual Studio Code, use the appropriate steps for your operating system.

Windows

  1. Download the Visual Studio Code installer for Windows.

  2. Run the installer.

  3. Open Visual Studio Code by pressing the Windows key or selecting the Windows icon on the task bar, typing "Visual Studio Code" and selecting the Visual Studio Code result.

macOS

  1. Download Visual Studio Code for macOS.

  2. Double-click the downloaded archive to expand the contents.

  3. Drag Visual Studio Code.app to the Applications folder.

  4. Open Visual Studio Code by selecting the icon the Apps section or by searching for Visual Studio Code in Spotlight.

Linux

Debian and Ubuntu

  1. Download and install the .deb package (64-bit) through the graphical software center (if it's available) or through the command line (replacing <file> with the .deb filename you downloaded):

    sudo dpkg -i <file>.deb
    sudo apt-get install -f # Install dependencies
    

RHEL and Fedora

  1. Use the following script to install the key and repository:

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > etc/yum.repos.d/vscode.repo'
    
  2. Update the package cache and install the package by using dnf (Fedora 22 and above):

    dnf check-update
    sudo dnf install code
    

openSUSE and SLE

  1. The yum repository also works for openSUSE and SLE-based systems. The following script will install the key and repository:

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/vscode.repo'
    
  2. Update the package cache and install the package by using:

    sudo zypper refresh
    sudo zypper install code
    

Note

For further details about installing or updating Visual Studio Code on various Linux distributions, please see the Running Visual Studio Code on Linux documentation.

Install Azure App Service extension

  1. If you haven't already, open Visual Studio Code.

  2. Open the Extensions browser via the menu on the left.

  3. Search for Azure App Service.

  4. Select the Azure App Service result and select Install.

    The following screenshot shows the Azure App Service extension selected from the Visual Studio Code extension search results:

    Screenshot of Visual Studio Code showing the Extensions tab with the Azure App Service extension highlighted in the search results.

Visual Studio Code will install the extension. You're now ready to connect to your Azure subscription and deploy a web, mobile, or API app to an Azure App Service.

Here, you'll install Visual Studio on either your Windows or macOS development machine.

Exercise steps

To install Visual Studio, use the appropriate steps for your operating system.

Windows

  1. Go to https://visualstudio.microsoft.com/downloads/ and select the edition you want to install.

    • Community Free download is always free for students and individuals
    • Professional Free trial for small teams
    • Enterprise Free trial for large organizations with 500 or more user devices
  2. When the executable finishes downloading, launch the installer and select Modify.

  3. On the Workloads tab, select the Azure development workload. The Installation details pane on the right displays the tools and extensions for Azure.

    Screenshot of Visual Studio Installer Workloads with Azure development highlighted.

  4. (Optional) Select the check boxes to include ASP.NET and web development, Python development, and Node.js development workloads to be ready to create web applications and scripts in Azure.

  5. Select Install and wait for Visual Studio to install. For systems with Visual Studio already installed, select Modify. If prompted with a User Account Control dialog, select Yes to permit the installer to run.

    Visual Studio Installer notifies you of any updates required in the versions you have on your system.

  6. When the installation is complete, select Launch to open Visual Studio.

Here, you'll install Eclipse and the Azure Toolkit on your development machine. By the end of the exercise, you'll have everything you need to create a Java application connected to Azure.

Install Eclipse IDE

  1. Download the appropriate Eclipse IDE for your operating system.

  2. Start the Eclipse installer once downloaded.

    • On Windows, double-click the downloaded file.

    • On macOS and Linux, unzip the installer from the downloaded file and run it.

    Note

    The installer might prompt you to install the Java Development Kit, if it is missing.

  3. Select the packages to install. For Java developers, choose either the Java or Java EE Eclipse IDE option.

  4. Select the installation destination on your machine.

  5. Launch Eclipse to validate that it installed correctly.

Install Azure Toolkit for Eclipse

Installing the Azure Toolkit is the same across Windows, macOS, and Linux.

  1. Start Eclipse and open a workspace.

  2. Drag the following icon into the Eclipse workspace to install the Azure Toolkit for Eclipse plugin.

    Screenshot of the Eclipse install icon.

  3. In the confirmation dialog, select Confirm to continue.

    Screenshot of the feature confirmation dialog in Eclipse.

  4. Review and accept the license agreements, then select Finish.

  5. Eclipse will download and install the Azure Toolkit.

  6. Restart Eclipse, if necessary.

  7. Validate the Azure Toolkit installation by verifying that Azure exists in the Tools menu.

Here, you'll install IntelliJ IDEA and the Azure Toolkit on your development machine. By the end of the exercise, you'll have everything you need to create a Java application connected to Azure.

Install IntelliJ IDEA

  1. Download the appropriate IntelliJ IDEA for your operating system.

  2. Start the IntelliJ IDEA installer once downloaded.

    • On Windows, double-click the downloaded file.

    • On macOS and Linux, unzip the installer from the downloaded file and run it.

    Note

    The installer might prompt you to install the Java Development Kit, if it is missing.

  3. Select the installation destination on your machine and confirm other settings.

  4. Launch IntelliJ IDEA to validate that it installed correctly.

Install Azure Toolkit for IntelliJ

Installing the Azure Toolkit is the same across Windows, macOS, and Linux.

  1. Start IntelliJ IDEA and open a workspace.

  2. Go to Configure > Settings.

  3. In the Settings dialog, select Plugins, then search for Azure Toolkit for IntelliJ in plugin marketplace.

    Screenshot of IntelliJ IDEA showing the Settings window with Plugin section selected and search results for Azure Toolkit for IntelliJ.

  4. Select OK, then select Install.

  5. Review and accept the license agreements if prompted. IntelliJ IDEA will download and install the Azure Toolkit.

  6. Restart IntelliJ IDEA after the installation.

  7. Verify that the Azure Toolkit ha installed checking the Tools menu for Azure.