Inspect Element Using System.Windows.Forms.WebBrow

2019-07-29 07:10发布

问题:

Using the context menu inside internet explorer allows you to inspect the element to see styles etc attached to a html element.

Is there anyway that you enable this functionality inside the webbrowser control? (I am guessing it is not included to make it lighter, if so is there an alternative?)

It is not my intention to make this available to the client but it would certainly help when debugging the pages sent to the control in my winform application.

回答1:

As no one seemed to bite on this question I have settled with using the following solution.

https://getfirebug.com/firebuglite#Stable

Using the instructions on this page I was able to press F12 on the webbrowser control to show a "Lite" version of Firebug, this allows me to happily inspect the elements.