You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

本地开发时Azure Blob Event Grid触发器未触发问题排查

基于Event Grid的Blob触发器Azure Function本地调试未触发排查

使用VS2022社区版创建基于Event Grid的Blob触发器Azure Function,在Azure Storage Explorer中上传文件后函数未触发。输出窗口的服务依赖项中能看到上传的文件,但断点始终未命中,请求排查配置是否存在问题。

函数代码

public class Function1
{
    private readonly ILogger<Function1> _logger;

    public Function1(ILogger<Function1> logger)
    {
        _logger = logger;
    }

    [Function(nameof(Function1))]
    public async Task Run([BlobTrigger("samples-workitems/{name}", Source = BlobTriggerSource.EventGrid, Connection = "AzureWebJobsStorage")] Stream stream, string name)
    {
        using var blobStreamReader = new StreamReader(stream);
        var content = await blobStreamReader.ReadToEndAsync();
        _logger.LogInformation($"C# Blob Trigger (using Event Grid) processed blob\n Name: {name} \n Data: {content}");
    }
}

local.settings.json配置

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"
  }
}

相关截图

  • 存储模拟器状态:
    存储模拟器状态
  • 输出窗口内容:
    输出窗口内容

内容的提问来源于stack exchange,提问作者solarissf

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 18:14:53