Microsoft 团队选项卡的 DevToolsDevTools for Microsoft Teams tabs

当工作组在浏览器中运行时,很容易访问浏览器的 DevTools: F12 (在 Windows 中)或命令-Option-I (在 MacOS 上)。When Teams is running in a browser, it’s easy to access the browser's DevTools: F12 (on Windows) or Command-Option-I (on MacOS). DevTools 使您可以访问:The DevTools gives you access to:

  1. 查看控制台日志。View console logs.
  2. 在运行时查看/修改 html、css 和网络请求。View/modify html, css, and network requests during runtime.
  3. 将断点添加到 JavaScript 代码,并执行交互式调试。Add breakpoints to your JavaScript code, and perform interactive debugging.

仅在启用开发人员预览版后,桌面和 Android 客户端中才会提供此功能。The feature is only available in desktop and Android clients after Developer Preview has been enabled. 有关详细信息,请参阅如何启用开发人员预览See How do I enable Developer Preview for more information.

访问桌面中的 DevToolsAccessing DevTools in the Desktop

虽然团队的 web 版本和团队的桌面版本几乎完全相同,但在某些方面存在差异,尤其是对于身份验证。While the web version of Teams and the desktop version of teams are almost exactly the same, there are some differences, particularly with respect to authentication. 有时,确定要执行的操作的唯一方法是使用 DevTools。Sometimes the only way to figure out what’s going on is to use the DevTools. 下面介绍了如何从团队桌面客户端获取它们。Here's how to get to them from the Teams desktop client. 在桌面客户端中使用 DevTools:To use DevTools in the desktop client:

  1. 请确保已启用开发人员预览版Make sure you have enabled developer preview
  2. 打开 "选项卡",让您有一些要使用 DevTools 检查的内容。Open up a tab so you have something to inspect with the DevTools.
  3. 打开 DevToolsOpen the DevTools
    • 在 Windows 中,你可以通过桌面托盘中的 Microsoft 团队图标打开 DevTools:On Windows, you open DevTools via the Microsoft Teams icon in the desktop tray:

右键单击打开 DevTools

* <span data-ttu-id="480a6-122">在 MacOS 上,单击插接中的 "Microsoft 团队" 图标。</span><span class="sxs-lookup"><span data-stu-id="480a6-122">On MacOS, click on the Microsoft Teams icon in the Dock.</span></span>

以下是在打开 DevTools 并选择一个元素时的示例选项卡的外观:Here’s what a sample tab looks like with the DevTools open and an element selected:

Tab 和 DevTools

从 Android 客户端访问 DevToolsAccessing DevTools from an Android client

您还可以从 "团队 Android 客户端" 启用 DevTools。You can also enable the DevTools from the Teams Android client. 为此,请执行以下操作:To do so:

  1. 请确保已启用开发人员预览版Make sure you have enabled developer preview
  2. 将设备连接到桌面计算机,并将您的 Android 设备设置为进行远程调试Connect your device to your desktop computer, and setup your Android device for remote debugging
  3. 在 Chrome 浏览器中, chrome://inspect/#devices打开。In your Chrome browser, open chrome://inspect/#devices.
  4. 在您希望调试的选项卡下方单击 "检查",如下面的屏幕截图所示。Click inspect below the tab you wish to debug, as in the screenshot below.

Android DevTools