6

Just wondering if anyone has managed to attach and debug an Azure Functions app using JetBrains Rider?

There only seems to be 2 debug options for Azure Functions

--debug VS 
--debug VsCode

Not sure if Rider can attach to these, I can't find much on this. So if anyone else has succeeded please let me know how/if it can be done.

Thanks.

Lenny D
  • 1,734
  • 4
  • 22
  • 43

2 Answers2

3

No, this is not possible to date (4. Oct. 2018): According to the Rider online bug report (This is not implemented yet, please feel free to vote for https://youtrack.jetbrains.com/issue/RIDER-1256) this is not solved, yet.

Peter Branforn
  • 1,679
  • 3
  • 17
  • 29
3

The above issue has now been resolved, however it still does not support Azure Functions.

However I did find this, please note this appears to be windows only, not Mac.

https://github.com/JetBrains/azure-tools-for-intellij/issues/78#issuecomment-439313762

Install the Azure functions command line tools using NPM (https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local)

Add a file Properties/launchSettings.json, with the following contents (tailored to your project):

{
  "profiles": {
    "functions": {
      "commandName": "Executable",
      "executablePath": "dotnet",
      "commandLineArgs": "%APPDATA%\\npm\\node_modules\\azure-functions-core-tools\\bin\\func.dll host start --port 7071 --pause-on-error",
      "environmentVariables": {
        "AZURE_FUNCTIONS_ENVIRONMENT": "Development",
        "AzureWebJobsStorage": "UseDevelopmentStorage=true"
      }
    }
  }
}

Run the launch profile, and wait for the functions host to say it is running In Rider, attach to the process using Run | Attach to Process.... Find the process that is running dotnet ... func.dll:

Lenny D
  • 1,734
  • 4
  • 22
  • 43