3

With the newly released WebView2, is it possible to open the DevTools from code (WinForms)?

I want to automatically show the DevTools (console) on Javascript errors.

demonplus
  • 5,613
  • 12
  • 49
  • 68
MojoDK
  • 4,410
  • 10
  • 42
  • 80

1 Answers1

3

Just call the method OpenDevToolsWindow() of the ICoreWebView2 Interface.

https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.664.37#opendevtoolswindow

ChrCury78
  • 427
  • 3
  • 8