-
Notifications
You must be signed in to change notification settings - Fork 7
How to: Auto open DevTools
David Risney edited this page Jan 6, 2023
·
4 revisions
Many apps will block the end user from opening DevTools. As a developer you can use WebView2Utilities to auto open DevTools when a WebView2 is created.
- Install and run WebView2Utilities
- Select the
Overrides
tab. - Press the
Add New
button. - Select the newly added entry in the list.
- Change the
Host app exe
textbox to be the name of the executable file of your host app. For example,OUTLOOK.EXE
. - Check the
Auto open DevTools
checkbox. - If already running, close your host app.
- Restart your host app.
When the host app creates a WebView2 it should now automatically open DevTools.
You can manually do the same thing without using WebView2Utilities by setting an appropriate registry key [{Root}]\Software\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments
(as described in the WebView2 docs) to include the --auto-open-devtools-for-tabs
command line argument.