How do I debug channel data in bot framework? The Next CEO of Stack OverflowHow to resolve the error as “500 internal server error” in Bot Framework Channel Emulator?Bot Framework - Bot initiates the conversation on SkypeHow to make Bot Framework channels pick up changed BotEnable Directline in MS BOT FrameworkResume Bot Framework dialog when triggered by external serviceBOT Directline Channel User AuthenticationMicrosoft Bot Framework - Directline Task CancelledDebug msft teams bot channel conversationMicrosoft Bot Framework v4 Random 'Unauthorized' error on initial conversationPassing QueryString to Microsoft bot web channel

Is the 21st century's idea of "freedom of speech" based on precedent?

Does the Idaho Potato Commission associate potato skins with healthy eating?

How to show a landlord what we have in savings?

Car headlights in a world without electricity

logical reads on global temp table, but not on session-level temp table

Is a linearly independent set whose span is dense a Schauder basis?

Could a dragon use hot air to help it take off?

Is this a new Fibonacci Identity?

A hang glider, sudden unexpected lift to 25,000 feet altitude, what could do this?

Another proof that dividing by 0 does not exist -- is it right?

Could a dragon use its wings to swim?

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

Planeswalker Ability and Death Timing

Why did early computer designers eschew integers?

Find the majority element, which appears more than half the time

Ising model simulation

Why do we say “un seul M” and not “une seule M” even though M is a “consonne”?

How does a dynamic QR code work?

What is a typical Mizrachi Seder like?

Are British MPs missing the point, with these 'Indicative Votes'?

Read/write a pipe-delimited file line by line with some simple text manipulation

Can a PhD from a non-TU9 German university become a professor in a TU9 university?

pgfplots: How to draw a tangent graph below two others?

Strange use of "whether ... than ..." in official text



How do I debug channel data in bot framework?



The Next CEO of Stack OverflowHow to resolve the error as “500 internal server error” in Bot Framework Channel Emulator?Bot Framework - Bot initiates the conversation on SkypeHow to make Bot Framework channels pick up changed BotEnable Directline in MS BOT FrameworkResume Bot Framework dialog when triggered by external serviceBOT Directline Channel User AuthenticationMicrosoft Bot Framework - Directline Task CancelledDebug msft teams bot channel conversationMicrosoft Bot Framework v4 Random 'Unauthorized' error on initial conversationPassing QueryString to Microsoft bot web channel










0















I have a bot where I've recently started passing channel data (user info) in from my directline client but now this makes it really hard to debug/test code that relies on this channel data.



Is there a way to have the Bot Framework Emulator send channel data or is there a better way to debug in this situation?










share|improve this question






















  • You can debug the direct line channel, or any channel, locally: blog.botframework.com/2017/10/19/…

    – Eric Dahlvang
    Mar 8 at 0:07











  • @JeremyCoenen Did my answer resolve your issue? If so, please "accept" the answer and I will close the ticket from my support tracker. If not, let me know how I can help!

    – mdrichardson
    Mar 12 at 20:47















0















I have a bot where I've recently started passing channel data (user info) in from my directline client but now this makes it really hard to debug/test code that relies on this channel data.



Is there a way to have the Bot Framework Emulator send channel data or is there a better way to debug in this situation?










share|improve this question






















  • You can debug the direct line channel, or any channel, locally: blog.botframework.com/2017/10/19/…

    – Eric Dahlvang
    Mar 8 at 0:07











  • @JeremyCoenen Did my answer resolve your issue? If so, please "accept" the answer and I will close the ticket from my support tracker. If not, let me know how I can help!

    – mdrichardson
    Mar 12 at 20:47













0












0








0








I have a bot where I've recently started passing channel data (user info) in from my directline client but now this makes it really hard to debug/test code that relies on this channel data.



Is there a way to have the Bot Framework Emulator send channel data or is there a better way to debug in this situation?










share|improve this question














I have a bot where I've recently started passing channel data (user info) in from my directline client but now this makes it really hard to debug/test code that relies on this channel data.



Is there a way to have the Bot Framework Emulator send channel data or is there a better way to debug in this situation?







botframework






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 19:35









Jeremy CoenenJeremy Coenen

92011017




92011017












  • You can debug the direct line channel, or any channel, locally: blog.botframework.com/2017/10/19/…

    – Eric Dahlvang
    Mar 8 at 0:07











  • @JeremyCoenen Did my answer resolve your issue? If so, please "accept" the answer and I will close the ticket from my support tracker. If not, let me know how I can help!

    – mdrichardson
    Mar 12 at 20:47

















  • You can debug the direct line channel, or any channel, locally: blog.botframework.com/2017/10/19/…

    – Eric Dahlvang
    Mar 8 at 0:07











  • @JeremyCoenen Did my answer resolve your issue? If so, please "accept" the answer and I will close the ticket from my support tracker. If not, let me know how I can help!

    – mdrichardson
    Mar 12 at 20:47
















You can debug the direct line channel, or any channel, locally: blog.botframework.com/2017/10/19/…

– Eric Dahlvang
Mar 8 at 0:07





You can debug the direct line channel, or any channel, locally: blog.botframework.com/2017/10/19/…

– Eric Dahlvang
Mar 8 at 0:07













@JeremyCoenen Did my answer resolve your issue? If so, please "accept" the answer and I will close the ticket from my support tracker. If not, let me know how I can help!

– mdrichardson
Mar 12 at 20:47





@JeremyCoenen Did my answer resolve your issue? If so, please "accept" the answer and I will close the ticket from my support tracker. If not, let me know how I can help!

– mdrichardson
Mar 12 at 20:47












1 Answer
1






active

oldest

votes


















1














Emulator doesn't have an easy, built-in way to send custom channelData. There's a few different ways you can (kind of) do this, though:



Debug Locally



As @EricDahlvang mentioned (I forgot about this), you can debug any channel locally



WebChat



Emulator is built in WebChat, so the output will be the exact same. However, you miss some of the debugging functionality from Emulator.



  1. Clone a WebChat Sample

  2. Edit index.html with http://localhost:3978/api/messages and your channelData

  3. Run npx serve

  4. Navigate to http://localhost:5000

Modify Messages In OnTurnAsync()



This would only be for testing/mocking purposes and you'd want to ensure this doesn't go into production, but you can modify incoming messages inside OnTurnAsync() and manually add the channelData.



Something like:



public async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken))
{
var activity = turnContext.Activity;

activity.ChannelData = new

testProperty = "testValue",
;


You could even make it happen with only specific messages, with something like:



if (turnContext.Activity.Text == "change channel data")

activity.ChannelData = new

testProperty = "testValue",
;



There's a lot of different options with this one, you just need to make sure it doesn't go into production.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55051536%2fhow-do-i-debug-channel-data-in-bot-framework%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Emulator doesn't have an easy, built-in way to send custom channelData. There's a few different ways you can (kind of) do this, though:



    Debug Locally



    As @EricDahlvang mentioned (I forgot about this), you can debug any channel locally



    WebChat



    Emulator is built in WebChat, so the output will be the exact same. However, you miss some of the debugging functionality from Emulator.



    1. Clone a WebChat Sample

    2. Edit index.html with http://localhost:3978/api/messages and your channelData

    3. Run npx serve

    4. Navigate to http://localhost:5000

    Modify Messages In OnTurnAsync()



    This would only be for testing/mocking purposes and you'd want to ensure this doesn't go into production, but you can modify incoming messages inside OnTurnAsync() and manually add the channelData.



    Something like:



    public async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken))
    {
    var activity = turnContext.Activity;

    activity.ChannelData = new

    testProperty = "testValue",
    ;


    You could even make it happen with only specific messages, with something like:



    if (turnContext.Activity.Text == "change channel data")

    activity.ChannelData = new

    testProperty = "testValue",
    ;



    There's a lot of different options with this one, you just need to make sure it doesn't go into production.






    share|improve this answer





























      1














      Emulator doesn't have an easy, built-in way to send custom channelData. There's a few different ways you can (kind of) do this, though:



      Debug Locally



      As @EricDahlvang mentioned (I forgot about this), you can debug any channel locally



      WebChat



      Emulator is built in WebChat, so the output will be the exact same. However, you miss some of the debugging functionality from Emulator.



      1. Clone a WebChat Sample

      2. Edit index.html with http://localhost:3978/api/messages and your channelData

      3. Run npx serve

      4. Navigate to http://localhost:5000

      Modify Messages In OnTurnAsync()



      This would only be for testing/mocking purposes and you'd want to ensure this doesn't go into production, but you can modify incoming messages inside OnTurnAsync() and manually add the channelData.



      Something like:



      public async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken))
      {
      var activity = turnContext.Activity;

      activity.ChannelData = new

      testProperty = "testValue",
      ;


      You could even make it happen with only specific messages, with something like:



      if (turnContext.Activity.Text == "change channel data")

      activity.ChannelData = new

      testProperty = "testValue",
      ;



      There's a lot of different options with this one, you just need to make sure it doesn't go into production.






      share|improve this answer



























        1












        1








        1







        Emulator doesn't have an easy, built-in way to send custom channelData. There's a few different ways you can (kind of) do this, though:



        Debug Locally



        As @EricDahlvang mentioned (I forgot about this), you can debug any channel locally



        WebChat



        Emulator is built in WebChat, so the output will be the exact same. However, you miss some of the debugging functionality from Emulator.



        1. Clone a WebChat Sample

        2. Edit index.html with http://localhost:3978/api/messages and your channelData

        3. Run npx serve

        4. Navigate to http://localhost:5000

        Modify Messages In OnTurnAsync()



        This would only be for testing/mocking purposes and you'd want to ensure this doesn't go into production, but you can modify incoming messages inside OnTurnAsync() and manually add the channelData.



        Something like:



        public async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken))
        {
        var activity = turnContext.Activity;

        activity.ChannelData = new

        testProperty = "testValue",
        ;


        You could even make it happen with only specific messages, with something like:



        if (turnContext.Activity.Text == "change channel data")

        activity.ChannelData = new

        testProperty = "testValue",
        ;



        There's a lot of different options with this one, you just need to make sure it doesn't go into production.






        share|improve this answer















        Emulator doesn't have an easy, built-in way to send custom channelData. There's a few different ways you can (kind of) do this, though:



        Debug Locally



        As @EricDahlvang mentioned (I forgot about this), you can debug any channel locally



        WebChat



        Emulator is built in WebChat, so the output will be the exact same. However, you miss some of the debugging functionality from Emulator.



        1. Clone a WebChat Sample

        2. Edit index.html with http://localhost:3978/api/messages and your channelData

        3. Run npx serve

        4. Navigate to http://localhost:5000

        Modify Messages In OnTurnAsync()



        This would only be for testing/mocking purposes and you'd want to ensure this doesn't go into production, but you can modify incoming messages inside OnTurnAsync() and manually add the channelData.



        Something like:



        public async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken))
        {
        var activity = turnContext.Activity;

        activity.ChannelData = new

        testProperty = "testValue",
        ;


        You could even make it happen with only specific messages, with something like:



        if (turnContext.Activity.Text == "change channel data")

        activity.ChannelData = new

        testProperty = "testValue",
        ;



        There's a lot of different options with this one, you just need to make sure it doesn't go into production.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 8 at 19:46

























        answered Mar 7 at 22:16









        mdrichardsonmdrichardson

        1,0511111




        1,0511111





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55051536%2fhow-do-i-debug-channel-data-in-bot-framework%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            1928 у кіно

            Захаров Федір Захарович

            Ель Греко