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.
Let's find out how easy it is to run a Function locally. The first step is to install the plugin that will enable support for Azure Functions. Go to the Settings (ctrl+alt+s) > Plugins tab and search for "Azure Toolkit for Rider" and install it.
Run the function locallyUnder Functions, expand Local Project > Functions. Right-click (Ctrl-click on Mac) the HttpExample function and select Execute Function Now.... In the Enter request body, you see the request message body value of { "name": "Azure" } . Press Enter to send this request message to your function.
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.
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With