microsoft / vscode-azurefunctions

Azure Functions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions
MIT License
291 stars 132 forks source link

Fail to debug .NET 6/7/8 projects with Azure Event Grid trigger Function #4041

Open Amar-QA opened 5 months ago

Amar-QA commented 5 months ago

OS: All Build Version: 20240305.5 Regression: Not a Regression

Repro Steps:

  1. Create a .NET 6/7/8 project >- Select "Azure Event Grid Trigger" for the Functions.
  2. Debug the Project.
  3. Check if the function project is successfully debugged.

Expected: It should successfully debug the 'Azure Event Grid Trigger' function.

image

Actual: Fail to debug the "Azure Event Grid Trigger" function. image

More info:

  1. This issue does not reproduce for Javascript, Typescript, Python and Powershell.
hossam-nasr commented 5 months ago

@Amar-QA Can you provide the value of your local.settings.json file? You should have an entry for AzureWebJobsStorage that is set to either a connection string of a valid Azure Storage account, or "UseDevelopmentStorage=true" to use the emulator. If none of these are set, this error is expected.

Amar-QA commented 5 months ago

Hi @hossam-nasr, here is the screenshot of local.settings.json file.

image
v-xinda commented 5 months ago

This issue also reproduces when debugging a .NET project created with Azure Blob Storage trigger template. I think the root cause is that below prompt doesn't pop up when debugging the project. image So the setting "AzureWebJobsStorage" cannot be filled automatically. image If I fill the setting "AzureWebJobsStorage" manually, the debug is successful.

Amar-QA commented 3 months ago

Verified this bug on v1.14.4-alpha.0 build, it also reproduces when debugging Python and Java projects with Azure Blob Storage Trigger template.

image

v-chenzha commented 3 months ago

Verified this bug on v1.14.4-alpha.0 build, it also reproduces when debugging Python and Powershell projects with Azure Event Grid Trigger template.