【问题标题】:Custom debug logging with Microsoft Bot Framework Emulator v4使用 Microsoft Bot Framework Emulator v4 自定义调试日志记录
【发布时间】:2019-01-15 02:55:31
【问题描述】:

是否可以将自定义调试日志添加到带有Microsoft Bot Framework Emulator v4 的消息中?

您可以在检查器中查看一些日志记录:

我已尝试找到here 的解决方案,这是 Bot Framework V3 的解决方案

var reply = activity.CreateReply("test");
string json = @"{
    CustomField1: 'Field one value',
    CustomField2Array: [
        'First Element',
        'Second Element'
        ]
    }";


reply.ChannelData = JObject.Parse(json);
await context.PostAsync(reply);

但这不适用于 Bot Framework V4 中的对话框

【问题讨论】:

    标签: c# azure botframework


    【解决方案1】:

    ChannelData 仍然可以在 Bot Builder V4 对话框中设置并使用 V4 模拟器查看:

     var reply = step.Context.Activity.CreateReply();
    
     string json = @"{
         CustomField1: 'Field one value',
         CustomField2Array: [
             'First Element',
             'Second Element'
                            ]
         }";
    
      reply.ChannelData = JObject.Parse(json);
    

    【讨论】:

      猜你喜欢
      • 2017-08-27
      • 2013-04-14
      • 2019-07-27
      • 1970-01-01
      • 1970-01-01
      • 2016-09-05
      • 2019-08-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多