|
Rank: Member Groups: Member
Joined: 11/13/2015 Posts: 29
|
Hello, When running an embedded WebView and lunching a browser (chrome) to the dubug port (localhost:9000), I get a list of opened instances. Same as if I would go to localhost:9000/json/list, but I see no way to correlate the instance I'm trying to debug with the debugger list item (which have GUID-like IDs). Is there a way to get the same ID from the WebView so I can correlate them?
In essence, what I'm trying to do is to create an F12 dev tool experience, which when the user hits F12 a new WebView will be launched and pointed directly to the debug session of the WebView instance from which F12 was used.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
Hi, Yes. You would call this method on the WebView for which you wish to debug: https://www.essentialobjects.com/doc/eo.webbrowser.webview.showdevtools.aspxNote that you will need to provide a valid window handle to this method because the window handle represents the "container" of the debug UI. Thanks!
|
|
Rank: Member Groups: Member
Joined: 11/13/2015 Posts: 29
|
Thank you for the quick reply!
What is the specifications of the window for which I need to provide the handle of? If I have another winform with an EO.WinForm.WebControl, do I provide the handle of that window? I tried doing that and nothing happened.
|
|
Rank: Member Groups: Member
Joined: 11/13/2015 Posts: 29
|
OK, I figured it out. it was simpler than I thought. All you have to do is create a new System.Windows.Forms.Form and provide the its handle. here's a code snippet for future reference:
Code: C#
var devTools = new System.Windows.Forms.Form();
devTools.Load += (sender, e) => webForm.WebView.ShowDevTools(devTools.Handle);
devTools.Show(form);
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
Great. Thanks for sharing!
|
|