Internet Explorer模式和 DevToolsInternet Explorer mode and the DevTools

本文介绍如何Internet Explorer模式 \ (IE mode) 与 Microsoft Edge \ (Chromium) DevTools 集成。This article describes how Internet Explorer mode (IE mode) integrates with the Microsoft Edge (Chromium) DevTools.

了解 IE 模式Understanding IE mode

IE 模式允许企业指定仅在 11 Internet Explorer的网站列表。IE mode allows enterprises to specify a list of web sites that only work in Internet Explorer 11. 在 Microsoft Edge \ (Chromium) 中导航到这些网站时,Internet Explorer 11 的实例将运行并在选项卡中呈现网站。 此功能允许企业管理与当前与任何新式 Web 浏览器不兼容的技术的兼容性。When you navigate to these web sites in Microsoft Edge (Chromium), an instance of Internet Explorer 11 runs and renders the site in a tab. The functionality allows enterprises to manage compatibility with technologies that are currently not compatible with any modern web browsers. IE 模式下包含对以下技术的支持。Support for the following technologies is included in IE mode.

  • IE 文档模式IE document modes
  • ActiveX 控件ActiveX controls
  • 其他旧版组件other legacy components

在 IE 模式下,呈现过程基于 Internet Explorer 11。In IE mode, the rendering process is based on Internet Explorer 11. Microsoft Edge \ (Chromium) 进程管理器处理呈现过程的生命周期。The Microsoft Edge (Chromium) process manager handles the lifetime of the rendering process. 它受特定网站 \ (app) 选项卡的生命周期) 。It is constrained to the lifetime of the tab for a specific site (or app). 当选项卡在 IE 模式下呈现时,特定选项卡的地址栏中将显示锁屏提醒。When a tab renders in IE mode, a badge appears in the address bar for the specific tab.

地址栏中的 IE 模式锁屏提醒

IE 模式当前适用于 Windows 10 版本 1903 \ (2019 年 5 月更新) ,但即将适用于所有受支持的 Windows 平台。IE mode is currently available on Windows 10 Version 1903 (May 2019 Update), but is coming soon to all supported Windows platforms.

在 IE 模式下的选项卡上启动 DevToolsLaunching the DevTools on a tab in IE mode

如果尝试在 IE 模式下查看网站的文档模式,请选择地址栏中的锁屏提醒。If you are trying to view the document mode of a web site in IE mode, choose the badge in the address bar.

使用 IE 模式锁屏提醒查看文档模式

如果选项卡使用的是 IE 模式,则 DevTools 将不起作用,并且会出现以下情况。If a tab is using IE mode, the DevTools do not work and the following conditions occur.

  • 如果选择或 F12 选择 Ctrl + Shift + I ,则启动 Microsoft Edge \ (Chromium) DevTools 的空白实例将显示以下消息。If you select F12 or select Ctrl+Shift+I, a blank instance of the Microsoft Edge (Chromium) DevTools is launched displays the following message.

    Developer Tools are not available in Internet Explorer mode.  To debug the page, open it in Internet Explorer 11.
  • 如果打开上下文菜单 \ (右键单击) 并选择" 查看源",将启动记事本。If you open a contextual menu (right-click) and choose View Source, Notepad is launched.

  • 如果打开上下文菜单 \ (右键单击) , 则 Inspect 元素 不可见。If you open a contextual menu (right-click), the Inspect Element is not visible.

DevTools \ (中的许多工具(如网络和性能工具) )不起作用**** 的原因是呈现**** 引擎在 IE 模式下从 Chromium 切换到 Internet Explorer 11。The reason that a number of the tools within the DevTools (like the Network and Performance tools) do not work is the rendering engine switches from Chromium to Internet Explorer 11 in IE mode. 若要提供反馈,请导航到"与 Microsoft Edge DevTools 团队联系"。To provide feedback, navigate to Getting in touch with the Microsoft Edge DevTools team.

在 IE 模式下启动的 DevTools

若要在 Internet Explorer 11 和 IE 模式下 (基于 Internet Explorer 11 的网站 \ (或 app) ,请执行以下步骤。To test your Internet Explorer 11-based website (or app) in Internet Explorer 11 and IE mode, perform the following steps.

  1. 打开Internet Explorer 11。Open Internet Explorer 11.
    • 在 Windows 10 上,找到 Internet Explorer 11 的快捷方式。On Windows 10, locate the shortcut for Internet Explorer 11.
      1. "开始"菜单 > Windows 附件 > Internet Explorer 11.Start Menu > Windows Accessories > Internet Explorer 11.
    • 在 Windows 7 上,找到 Internet Explorer 11。On Windows 7, locate Internet Explorer 11.
      1. "开始"菜单 > Internet Explorer 11.Start Menu > Internet Explorer 11.
  2. 在 Internet Explorer 11 中,打开同一网页。In Internet Explorer 11, open the same webpage.
  3. 启动 Internet Explorer DevTools。Launch the Internet Explorer DevTools.
    • 选择 F12Select F12.
    • 将鼠标悬停在任意位置,打开上下文菜单 \ (右键单击) ,然后选择 "检查元素"。Hover anywhere, open a contextual menu (right-click), and choose Inspect element. 有关如何使用这些工具的信息,请导航到"使用 F12 开发人员工具"。For more information about how to use those tools, navigate to Using the F12 developer tools.

远程调试和 IE 模式Remote debugging and IE mode

启动 Microsoft Edge \ (Chromium) ,同时从命令行界面启用远程调试。Launch Microsoft Edge (Chromium) with remote debugging turned on from the command-line interface. Microsoft Visual Studio、Microsoft Visual Studio Code 和其他开发工具通常运行命令以启动 Microsoft Edge。Microsoft Visual Studio, Microsoft Visual Studio Code, and other development tools typically run a command to launch Microsoft Edge. 以下命令启动 Microsoft Edge,远程调试端口设置为 9222The following command launches Microsoft Edge with the remote debugging port set to 9222.

start msedge --remote-debugging-port=9222

在使用命令行参数启动 Microsoft Edge \ (Chromium) 后,IE 模式将不可用。After you launch Microsoft Edge (Chromium) using a command-line argument, IE mode is unavailable. 你仍然可以导航到 IE 模式下 (或应用) 或应用\应用。You may still navigate to websites (or apps) that are otherwise displayed in IE mode. 网站 \ (或 app) 内容使用 Chromium 呈现,而不是Internet Explorer 11。The website (or app) content renders using Chromium, not Internet Explorer 11. 预计依赖 IE11 的网页部分(如ActiveX)无法正确呈现。Expect the parts of the webpages that rely on IE11, such as ActiveX controls, to not render correctly. IE 模式锁屏提醒不会显示在地址栏中。The IE mode badge does not appear in the address bar.

IE 模式仍然不可用,直到你完全关闭并重新启动 Microsoft Edge \ (Chromium) 。IE mode remains unavailable until you completely close and restart Microsoft Edge (Chromium).

联系 Microsoft Edge DevTools 团队Getting in touch with the Microsoft Edge DevTools team

使用以下选项讨论帖子中的新功能和更改,或与 DevTools 相关的任何其他内容。Use the following options to discuss the new features and changes in the post, or anything else related to DevTools.

  • 使用“发送反馈”图标发送反馈,或在 DevTools 中选择Alt+Shift+I \ (Windows、Linux) 或 Option+Shift+I \ (macOS)。Send your feedback using the Send Feedback icon or select Alt+Shift+I (Windows, Linux) or Option+Shift+I (macOS) in DevTools.
  • 发推 @EdgeDevToolsTweet at @EdgeDevTools.
  • 我们想要的 Web 提交建议。Submit a suggestion to The Web We Want.
  • 若要提交有关本文的错误,请使用以下“反馈” 部分。To file bugs about this article, use the following Feedback section.

Microsoft Edge DevTools 中的“发送反馈”图标