You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/bot-service-debug-bot.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,7 @@ In Visual Studio (VS), you can set breakpoints and run the bot in debug mode to
64
64
> The **EchoBot** is default to using **Table Storage**. To use Table Storage in your bot, you need the table *name* and *key*. If you do not have a Table Storage instance ready, you can create one or for testing purposes, you can comment out the code that uses **TableBotDataStore** and uncomment the line of code that uses **InMemoryDataStore**. The **InMemoryDataStore** is intended for testing and prototyping only.
65
65
-->
66
66

67
+
67
68
5. Start the Bot Framework Emulator and connect to your bot as described in the section above.
68
69
6. From the emulator, send your bot a message (e.g.: send the message "Hi"). Execution will stop at the line where you place the breakpoint.
69
70

Copy file name to clipboardExpand all lines: articles/bot-service-debug-inspection-middleware.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ This article describes how to debug your bot using inspection middleware, a new
17
17
We use a basic Echo bot built with the [Bot Framework](https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/javascript_nodejs/02.echo-bot) to show how to add the inspection middleware to debug your bot and inspect the bot's message state. You can also [Debug a bot using IDE](./bot-service-debug-bot.md) or [Debug with the Bot Framework Emulator](./bot-service-debug-emulator.md) but to debug state you need to add inspection middleware to your bot. The Inspection bot samples are available here: [C#](https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/47.inspection) and [JavaScript](https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/javascript_nodejs/47.inspection).
18
18
19
19
## Prerequisites
20
-
- Download and install the [Bot Framework Emulator](https://aka.ms/Emulator-wiki-getting-started).
20
+
- Download and install the [Bot Framework Emulator](https://aka.ms/Emulator-wiki-getting-started)
21
21
- Knowledge of bot [Middleware](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-middleware?view=azure-bot-service-4.0)
22
22
- knowledge of bot [Managing state](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-state?view=azure-bot-service-4.0)
23
23
- Download and install [ngrok](https://ngrok.com/) (if you want to debug a bot configured in Azure to use additional channels)
@@ -40,7 +40,7 @@ Then you need to update the code of your JavaScript bot as follows. You can read
40
40
41
41
**index.js**
42
42
43
-
Set up the inspection state and add the InspectionMiddleware to the adapter in the **index.js** file.
43
+
Set up the inspection state and add the inspection middleware to the adapter in the **index.js** file.
Set up the inspection state in the **Startup** file. Add the InspectionMiddleware to the adapter. The inspection state is provided through dependency injection. See the code update below or refer to the inspection sample here: [C#](https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/47.inspection).
54
+
Set up the inspection state in the **Startup** file. Add the inspection middleware to the adapter. The inspection state is provided through dependency injection. See the code update below or refer to the inspection sample here: [C#](https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/47.inspection).
3. Now open another emulator. This second emulator will work as a debugger. Follow the instructions as described in the previous step. Check **Open in debug mode** and then click **Connect**.
88
88
89
-
4. At this point you will see a UUID (/INSPECT attach< identifier>) in your debugging emulator. Copy the UUID and paste it to the chat box of the first emulator.
89
+
4. At this point you will see a UUID (`/INSPECT attach <identifier>`) in your debugging emulator. Copy the UUID and paste it to the chat box of the first emulator.
90
90
91
-
> ![NOTE]
92
-
> A universally unique identifier (UUID) is a unique ID for identifying information. A UUID is generated every time the emulator is launched in debug mode. The format of an UUID here looks like this: /INSPECT attach< identifier>.
91
+
> [!NOTE]
92
+
> A universally unique identifier (UUID) is a unique ID for identifying information. A UUID is generated every time when the emulator is launched in debug mode after you add the inspection middleware in your bot's code.
93
93
94
94
5. Now you can send messages in the chat box of your first emulator and inspect the messages in the debugging emulator. To inspect the state of the messages click **Bot State** in the debugging emulator and unfold **values** on the right **JSON** window. You will be able to see the state of your bot as follows:
@@ -103,7 +103,7 @@ At this point you have updated your emulator to the latest version and added the
103
103
To run your bot locally do the following:
104
104
1. Navigate to your bot's folder in a terminal and set your npm registration to use the [latest builds](https://botbuilder.myget.org/feed/botbuilder-v4-js-daily/package/npm/botbuilder-azure)
105
105
106
-
2. Run your bot locally. You will see your bot expose a port number like **3978**.
106
+
2. Run your bot locally. You will see your bot expose a port number like 3978.
107
107
108
108
3. Open another command prompt and navigate to your bot's project folder. Run the following command:
109
109
```
@@ -130,9 +130,9 @@ Now that your local bot is connected to ngrok you can configure your local bot t
130
130
131
131
5. Now let's enable the debugging mode in the emulator. In your emulator select **Debug** -> **Start Debugging**. Fill the ngrok IP address (don't forget to add **/api/messages**) in the **Bot URL** (for example, https://e58549b6.ngrok.io/api/messages). Fill **Microsoft App ID** with **appId** and **Microsoft App password** with **appSecret**. Make sure **Open in debug mode** is checked as well. Click **Connect**.
132
132
133
-
6. When the debugging mode is enabled a UUID will be generated in your emulator. A UUID is a unique ID generated every time you start the debugging mode in your emulator. Copy and paste the UUID to the **Test in Web Chat** chat box or your channel's chat box. You will see the message **Attached to session, all traffic is being replicated for inspection** in the chat box.
133
+
6. When the debugging mode is enabled a UUID will be generated in your emulator. A UUID is a unique ID generated every time you start the debugging mode in your emulator. Copy and paste the UUID to the **Test in Web Chat** chat box or your channel's chat box. You will see the message "Attached to session, all traffic is being replicated for inspection" in the chat box.
134
134
135
-
You can start debugging your bot by sending messages in the configured channel's chat box. Your local emulator will automatically update the messages with all the details for debugging. To inspect your bot's state of messages click **Bot State** and unfold the **values** in right json window.
135
+
You can start debugging your bot by sending messages in the configured channel's chat box. Your local emulator will automatically update the messages with all the details for debugging. To inspect your bot's state of messages click **Bot State** and unfold the **values** in the right JSON window.
[Bot.Builder.Community.Dialogs.Luis](https://www.nuget.org/packages/Bot.Builder.Community.Dialogs.Luis/) is now a Bot Builder Community library. The source is available on the community [repository](https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/develop/libraries/Bot.Builder.Community.Dialogs.Luis).
560
+
[Bot.Builder.Community.Dialogs.Luis](https://www.nuget.org/packages/Bot.Builder.Community.Dialogs.Luis/) is now a Bot Builder Community library. The source is available on the community [repository](https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/tree/develop/libraries/Bot.Builder.Community.Dialogs.Luis).
0 commit comments