Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 2.01 KB

debug-devtools.md

File metadata and controls

48 lines (32 loc) · 2.01 KB
title description author ms.author ms.topic ms.service ms.subservice ms.date
Debug WebView2 apps with Microsoft Edge DevTools
How to open Microsoft Edge DevTools when using a WebView2 app.
MSEdgeTeam
msedgedevrel
conceptual
microsoft-edge
webview
07/07/2022

Debug WebView2 apps with Microsoft Edge DevTools

Use Microsoft Edge Developer Tools to debug web content displayed in WebView2 controls, in the same way that you can debug another webpage that's displayed in Microsoft Edge.

DevTools debugging in a WebView2 control

When you're using a WebView2 app, there are several ways to open DevTools:

  • Press F12.
  • Press Ctrl+Shift+I.
  • Right-click the page and then select Inspect.

An app can also use the OpenDevToolsWindow API to programmatically open a DevTools window. For example, you can use this approach if the above hotkeys and the context menu items have been removed.


If none of the above approaches are available, you can add --auto-open-devtools-for-tabs to the browser arguments via an environment variable or registry key. This approach will open a DevTools window when a WebView2 is created.

See also