Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Debug your Teams app

Microsoft 365 Agents Toolkit (previously known as Teams Toolkit) helps you to debug and preview your Microsoft Teams app. Debug is the process of checking, detecting, and correcting issues or bugs to ensure the program runs successfully in Teams.

Debug your Teams app for Visual Studio Code

Agents Toolkit in Microsoft Visual Studio Code automates the debug process. You can detect errors and fix them as well as preview the teams app. You can also customize debug settings to create your tab or bot.

During the debug process:

  • Agents Toolkit automatically starts app services, launches debuggers, and uploads the Teams app.
  • Agents Toolkit checks the prerequisites during the debug background process.
  • Your Teams app is available for preview in Teams web client locally after debugging.
  • You can also customize debug settings to use your bot endpoints, development certificate, or debug partial component to load your configured app.
  • Visual Studio Code allows you to debug tab, bot, message extension, and Azure Functions.

Key debug features of Agents Toolkit

Agents Toolkit supports the following debug features:

Agents Toolkit performs background functions during debug process, which include verifying the prerequisites required for debug. You can see the progress of the verification process in the output channel of Agents Toolkit. In the setup process you can register and configure your Teams app.

Start debugging

You can press F5 as a single operation to start debugging. Agents Toolkit starts to check prerequisites, registers Microsoft Entra app, Teams app, and registers bot, starts services, and launches browser.

Multi-target debugging

Agents Toolkit utilizes multi-target debugging feature to debug tab, bot, message extension, and Azure Functions at the same time.

Toggle breakpoints

You can toggle breakpoints on the source codes of tabs, bots, message extensions, and Azure Functions. The breakpoints execute when you interact with the Teams app in a web browser. The following image shows toggle breakpoint:

πŸ‘ Screenshot shows the toggle breakpoints.

Hot reload

You can update and save the source codes of tab, bot, message extension, and Azure Functions at the same time when you're debugging the Teams app. The app reloads and the debugger reattach to the programming languages.

πŸ‘ Screenshot shows the hot reload for source codes.

Stop debugging

When you complete local debug, you can select Stop (Shift+F5) or [Alt] Disconnect (Shift+F5) from the floating debugging toolbar to stop all debug sessions and terminate tasks. The following image shows the stop debug action:

πŸ‘ Screenshot shows the stop debugging option.

Microsoft 365 Agents Playground

Agents Playground makes debugging your bot-based apps effortless. You can chat with your bot and see its messages and Adaptive Cards as they appear in Teams. You don’t need a Microsoft 365 developer account, tunneling, or Teams app and bot registration to use Agents Playground. For more information, see Agents Playground.

Debug apps in Teams desktop client

Agents Toolkit helps you to debug and preview your Microsoft Teams app in desktop client. For more information, see debug apps in Teams desktop client.

Prepare for debug

The following steps help you to prepare for debug:

Sign in to Microsoft 365

If you've signed up for Microsoft 365 already, sign in to Microsoft 365. For more information, see Microsoft 365 developer program.

Toggle breakpoints

Ensure that you can toggle breakpoints on the source codes of tabs, bots, message extensions, and Azure Functions. For more information, see Toggle breakpoints.

Customize debug settings

Agents Toolkit allows you to customize the debug settings to create your tab or bot. For more information on the full list of customizable options, see debug settings doc.

You can also customize debug settings for your existing bot app.

Customize scenarios

Here's a list of debug scenarios that you can use:

Next

See also


Feedback

Was this page helpful?

Additional resources