Cloud Shell Web Preview, debug individual Azure Functions, explore ARM – Azure Toolkit for Rider 2019.2 updates
With Rider 2019.2 released, we’re also releasing an update to the Azure Toolkit for Rider release. Next to a number of bug fixes, we’ve implemented support for Cloud Shell Web Preview to access HTTP services running in the Cloud Shell container. We have made running individual Azure Functions easier, and added a number of live templates to help speed up coding. The Azure Explorer now lets us explore Azure Resource Groups, and edit & deploy ARM templates.
Cloud Shell Web Preview
With Azure Cloud Shell, we can make use of a preconfigured container and work with command-line tools to manage Azure resources. Not only that: we can use it to quickly run applications without having to set up a local environment. Now, what happens if that application is a web application? How do we access it from our browser?
A couple of weeks ago, Azure Cloud Shell Web Preview was introduced, which lets us publish port ranges 1025-8079 and 8091-49151 to the Internet so we can access HTTP services running in the Azure Cloud Shell container (check this blog post by Thomas Maurer for details).
Opening (or closing) ports via Azure Cloud Shell Web Preview can be done from the Tools | Azure | Web preview menu, or using Go to Everything (Ctrl+T or double-shift) / Go to Action (Ctrl+Shift+A).
Here’s an example of running an ASP.NET MVC Core application in Azure Cloud Shell and accessing it from our own developer machine:
Run individual Azure Functions
The Azure Functions run/debug configuration provided by Rider lets us run/debug the application we’re building. However, we always have to run all functions instead of just the one we’re currently working on. While building an Azure Functions application for indexing and searching public types on NuGet.org, we found that being able to quickly run/debug individual functions would be quite handy.
Instead of having to add/remove
[Disable] attributes in code or hand-editing
host.json, the Azure Toolkit for Rider now adds an icon to the gutter from where we can quickly run or debug just that function.
When using the gutter mark to run/debug a function, Rider creates a temporary run/debug configuration. We can edit it, and add other functions to run as well. Clearing the setting’s contents will again run all functions in our project.
Azure Functions live templates
In the previous version of the Azure Toolkit for Rider, we introduced a number of file templates to create new functions. Thanks to a contribution of Marc Duiker, most function triggers can now be created using a live template.
func, Rider’s code completion lists available Azure Functions live templates. Using tab completion, we can quickly create a new function in an existing class:
Explore Azure Resource Groups and ARM template deployment
We’ve added a node for Azure Resource Groups in the Azure Explorer tool window, which lets us see the resource groups and deployments available in our subscription(s).
Being able to create and delete resource groups can be very useful while developing an ARM template to be used in your organization. If your team is making use of ARM templates to deploy resources to Azure, Rider makes it possible to deploy an ARM template (and parameters file) directly from within the IDE:
From the Azure Explorer tool window, resource groups can be deleted if needed, and existing deployments can be updated as well. We also support editing existing deployments, and exporting a template from them.
As always, please don’t hesitate to give us some feedback! Is there anything we can further improve? Want to browse through the sources or contribute? Find us on GitHub!