1

How can I include the sources (for later Remote Debugging) when publishing for an Azure Function. I was looking for an option for the .pubxml file. I did not see any option in the GUI itself. I tried with

  <IncludeSourceFilesProjectOutputGroup>Copy if Newer</IncludeSourceFilesProjectOutputGroup>

But nothing changed in the Cloud Explorer. I could not see the source files and therefore not attach the debugger.

Matthias
  • 1,386
  • 3
  • 24
  • 59
  • 1
    If you are using [VS Tools for Azure Functions](https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-your-first-function-visual-studio) you can set "copy to output directory" property on .cs files to Copy Always. Did you try this already? – Pragna Gopa Jan 05 '18 at 19:44
  • Also here is a solution to include files in web deploy: [how-do-you-include-additional-files-using-vs2010-web-deployment-packages](https://stackoverflow.com/questions/2747081/how-do-you-include-additional-files-using-vs2010-web-deployment-packages) – Pragna Gopa Jan 05 '18 at 19:50

1 Answers1

0

@PragnaGopa This hint helped me. VS copied the file. However in order to initiate the Debug Session I had to right click the app in the Cloud Explorer and

If you are using VS Tools for Azure Functions you can set "copy to output directory" property on .cs files to Copy Always. Did you try this already? – Pragna Gopa Jan 5 at 19:44

What was pretty confusing is that I found some comments that it is currently not supported at all which is definitely at the moment of this post January 2018 not true. But on the same page you will also find some screenshots how you actually attach the debugger (http://markheath.net/post/remote-debugging-azure-functions).

enter image description here

(Screenshot source: http://markheath.net/posts/files/remote-debugging-azure-functions-8.png)

Matthias
  • 1,386
  • 3
  • 24
  • 59