19

In all tutorials i found so far regarding azure functions with visual studio code, they are all about creating and deplyoing. i'm just wondering, how to open an existing azure function in vs code, modify it and redeploy it. Is that possible?

I can open the function but i can't edit it: enter image description here

Mario Semper
  • 511
  • 1
  • 3
  • 17

2 Answers2

8

You can install the azure functions extension in VS code and then you can login your azure account and open the existing azure function from VS code but it cannot be edited this way.

Update:

If we want to develop the code of the existing azure function on local(here the solution if for visual studio), we can download it from azure portal(shown as the screenshot below) enter image description here enter image description here

After that, we can open this project in visual studio.

Hope it would be helpful to your question~

d512
  • 32,267
  • 28
  • 81
  • 107
Hury Shen
  • 14,948
  • 1
  • 9
  • 18
  • I've edit my question and added a screenshot, i can open my function, but i can't edit it. – Mario Semper Nov 12 '19 at 14:28
  • Hi @MarioSemper I'm sorry, it seems we can't edit it in vs code even if we install the extension. I have update my answer, but the solution is for visual studio. – Hury Shen Nov 12 '19 at 14:56
0

@MarioSemper Okay, I faced this problem as well. One cannot edit the files directly like you wanted to in the screenshot. If you want to edit the files, assuming that the function code is somewhere in a scm, you can get that code into VS Code do your edits and upload the function to azure via VS Code. Once uploaded, you can see the updated function code in the function app under subscription ( as shown in the screenshot ). Bottomline, the view tells you what code is currently deployed in azure.