How to open developer tools from CEF

10,915 views
Skip to first unread message

Ram

unread,
Dec 25, 2012, 10:07:28 AM12/25/12
to cef...@googlegroups.com
Hi, 
   Is it possible to trigger open developer tools (webkit inspector) from code. i am searching the CefGlue demo apps & core, couldn't finmesd any.

Cheers
Ramesh

Dmitry Azaraev

unread,
Dec 25, 2012, 10:10:51 AM12/25/12
to cef...@googlegroups.com
1. Set CefSettings.RemoteDebuggingPort 

        /// <summary>
        /// Set to a value between 1024 and 65535 to enable remote debugging on the
        /// specified port. For example, if 8080 is specified the remote debugging URL
        /// will be http://localhost:8080. CEF can be remotely debugged from any CEF or
        /// Chrome browser window.
        /// </summary>
        public int RemoteDebuggingPort { get; set; }

2. Get devtools url via CefBrowserHost:

        /// <summary>
        /// Returns the DevTools URL for this browser. If |http_scheme| is true the
        /// returned URL will use the http scheme instead of the chrome-devtools
        /// scheme. Remote debugging can be enabled by specifying the
        /// "remote-debugging-port" command-line flag or by setting the
        /// CefSettings.remote_debugging_port value. If remote debugging is not enabled
        /// this method will return an empty string.
        /// </summary>
        public string GetDevToolsUrl(bool httpScheme)

3. Open this url in regular browser.

--
Best regards,
   Dmitry

Ram

unread,
Dec 25, 2012, 10:16:31 AM12/25/12
to cef...@googlegroups.com, dmitry....@gmail.com
Awesome, thank you Dmitry.

Donovan Rogers

unread,
Aug 8, 2013, 3:38:08 PM8/8/13
to cef...@googlegroups.com, dmitry....@gmail.com
We have set the RemoteDebuggingPort and then made a call to GetDevToolsUrl(true), which returns a local host URL.  When we paste that URL into a chrome browser tab, we get an empty page.  Did we miss something?


Donovan

Dmitry Azaraev

unread,
Aug 12, 2013, 4:15:37 AM8/12/13
to cef...@googlegroups.com
Hi. It is strange - will work fine... If problem still persist try do it in cefglue.client sample first or same from native cefclient.


--
You received this message because you are subscribed to the Google Groups "CefGlue" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cefglue+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Best regards,
   Dmitry

Donovan Rogers

unread,
Aug 13, 2013, 12:23:39 PM8/13/13
to cef...@googlegroups.com, dmitry....@gmail.com
We were confused about a number of items.  Once we got everyone on the same page with the correct version of CEF (3 not 1), your sample projects (WinForms and WPF) correctly displayed the Developer Tools.  Thanks for the help.


Donovan
Reply all
Reply to author
Forward
0 new messages