Skip to content
Related Articles
Open in App
Not now

Related Articles

Microsoft Azure – Creating Azure Functions From VS Code

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 09 Jul, 2021
Improve Article
Save Article

In this article, we will look into how to create an Azure Functions project with Visual Studio Code. To start working with Azure functions inside of Visual Studio Code, we’re going to need to make sure that we have the extension of the Azure functions is installed. So inside the marketplace, we are going to type “Azure Functions,” and we’re going to select the “Azure Functions Extension.”

In our instance of Visual Studio Code, we already have the Azure Functions Extension installed. So, if you don’t, make sure you go ahead and hit the “Install” button.

After you have that installed, you should see an Azure icon available here inside your editor. 

There should also be a function section here. Inside this, once you’ve authenticated, you should see a list of all the various subscriptions you have available. 

Also, notice here on the right side, you have a button that says “Create new project.”

We are going to click “Create New Project.” It’s going to ask us where we want to put it. We’ll create a folder, and we’ll call this “functiondemo.” And now, we can select what language we want to use. There is an option for “JavaScript,” “C-sharp” and “Java available.”

We are going to select “C sharp.” Now it’s asking, “How would you like to open this projects?” We are going to select “Add to workspace.”

 If we head back over to our “Explorer,” we should see our Azure Functions products have been created.

Now, the next thing we need to do is actually create a function. If we open the command line and we type “azure functions”, we can go down to “Create function“.

We’ll select the folder containing our function app and also to function triggered that we would like to create.  This is going to be an HTTP triggered function.

We’ll just give this a name of “Simple API”, and also the “Access rights”. We are going to leave this as anonymous for now.

Here you see the Azure Functions Visual Studio extension has gone ahead and scaffolded out of functions product. 

We can start working on debugging our Azure Function right here inside of Visual Studio Code.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!