Debug a skill or skill consumer

APPLIES TO: SDK v4

You may need to debug a skill or skill consumer bot, where the one you want to debug is running locally and the other is running in the cloud. In this situation, you can use the ngrok tool to expose the local bot endpoint as a public URL.

Prerequisites

To debug a local skill consumer

In this scenario, you do not need to modify the configuration of the deployed skill and you can use the Bot Framework Emulator to test the consumer directly.

  1. Set up a tunnelling endpoint for the local bot and configure its registration in the Azure portal as described in how to debug a bot from any channel using ngrok.
  2. Update the consumer's application configuration, and set the skill host endpoint to the URL generated by ngrok.
  3. Finally, run the consumer locally and connect to it as described in how to debug with the Emulator.

Tip

The local consumer will need a valid app ID and password.

To debug a local skill bot

While you are testing changes to a skill, you may want to run and debug it locally while it is accessed from a consumer bot hosted on a staging server.

In this scenario, you need to modify the configuration of the deployed skill consumer. Since you will use the consumer to test the bot.

  1. Set up a tunnelling endpoint for the local bot and configure its registration in the Azure portal as described in how to debug a bot from any channel using ngrok.
  2. Update the consumer's application configuration, and set the skill endpoint to the URL generated by ngrok. You may be able to edit the configuration directly on the server or you may have to redeploy the skill consumer.
  3. Run the skill locally and invoke it from the skill consumer.

Tip

The local skill will need a valid app ID and password.