Building Azure Functions in the Rider IDE

Posted

in

,

by


Many people now use Rider as their integrated development environment editor for .NET. However, when it comes to using it for developing Azure Functions, the out-of-the-box experience is (currently) less than ideal.

I say currently, because in the next update to the Azure Toolkit plugin for Rider Functions support has been added. This’ll make running and debugging function apps a breeze.

Until then though, here’s how you can run a functions app from Rider.

How to run Azure functions in Rider

First, you’ll need to install the function CLI (see creating an Azure function for the Mac).

Then, open your functions app in Rider by selecting the project or solution.

Create a Properties folder in the root directory if you don’t have one already, and then inside of that create a new JSON file called launchSettings.json.

Inside the JSON file, place the following object:

{
    "profiles": {
        "functions": {
            "commandName": "Executable",
            "executablePath": "func",
            "commandLineArgs": "start --port 7071 --pause-on-error"
        }
    }
}

You should see Rider now refresh, and add the configuration profile to your configurations with a little rocket icon. Click run, and your function app should start running within Rider.

Note that debugging is a little tricker for now. On Windows, once your function app is running you can go “Run” > “Attach to process” and choose your function app to listen to. But on a Mac, this has had mixed results.