How to remote debug an azure function that we trigger from console app

Amol Tidke 1 Reputation point
2021-03-03T11:53:25.537+00:00

Hi All,

I have created an azure function to upload a file from local to SharePoint online site.

I created one console application that takes input file from local path and get its content too. Then I am calling the azure function from this console application(with passing file data as parameter) and this azure function creating client context to connect to SP online site and upload this file to library.

I am using certificate authentication to connect to SP online site.

It works fine when I debug this in local(file uploaded to library) but didn't work for remote. I try to debug this for remote but couldn't hit break points.

Any help will be much appreciated.

Thanks & Regards,
Amol Tidke

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,301 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,692 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jerryzy 10,566 Reputation points
    2021-03-04T05:26:50.833+00:00

    Hi @Amol Tidke ,

    You can use Visual Studio Debug->"Attach to Process" for debugging the function remotly, checkout the blog for details:

    Remote debug your azure function app v2 in Visual Studio 2019

    And for the Azure Function, also need to enable remote debugging:

    74224-snipaste-2021-03-04-16-14-57.png

    Thanks
    Best Regards


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.