Using DevTools with CEF3

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Using DevTools with CEF3

Postby probablycorey » Wed Aug 22, 2012 5:17 pm

I can't figure out how to use the developer tools with CEF3 on OS X Lion. I'm using http://chromiumembedded.googlecode.com/ ... /1180/cef3 r746.

When I run the CefClient App the context menu "Show Dev Tools" is always disabled because
Code: Select all
browser->GetHost()->GetDevToolsURL(true)
is returning an empty string. I also tried loading "chrome-devtools://devtools/devtools.html?docked=true" into an iFrame directly, but the developer tools didn't load (only the shell UI loaded).
probablycorey
Newbie
 
Posts: 4
Joined: Thu May 03, 2012 1:28 pm

Re: Using DevTools with CEF3

Postby magreenblatt » Thu Aug 23, 2012 8:47 am

CEF3 uses remote debugging. Remote debugging can be enabled by specifying the "remote-debugging-port" command-line flag or by setting the CefSettings.remote_debugging_port value.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Using DevTools with CEF3

Postby Czarek » Sun Oct 21, 2012 4:46 am

What is the difference of using http or chrome-devtools shceme when calling GetDevToolsURL()? They both need remote debugging port set?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Using DevTools with CEF3

Postby steven181 » Wed Oct 31, 2012 5:20 am

I was also stuck with this DevTools.
Any body help us please.

Thanks

Steven
steven181
Techie
 
Posts: 11
Joined: Mon Oct 29, 2012 12:42 am

Re: Using DevTools with CEF3

Postby bpant » Wed Jan 30, 2013 2:53 pm

Like Marshall said, this worked for me when I added settings.remote_debugging_port=2012 for example, in cefclient_win.cpp in my case.

// Populate the settings based on command line arguments.
AppGetSettings(settings, app);

settings.remote_debugging_port = 2012; // for devtools usage
bpant
Techie
 
Posts: 14
Joined: Wed Jan 16, 2013 4:32 pm

Re: Using DevTools with CEF3

Postby magreenblatt » Wed Jan 30, 2013 2:55 pm

Czarek wrote:What is the difference of using http or chrome-devtools shceme when calling GetDevToolsURL()? They both need remote debugging port set?

Sorry, I missed this question. Yes, they both need remote debugging port set. The difference is whether the returned URL is externally accessible or not (http vs chrome-devtools).
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Using DevTools with CEF3

Postby Czarek » Wed Jan 30, 2013 3:02 pm

You can enable Developer Tools in CEF 3 cefclient by passing a command line flag:
Code: Select all
cefclient.exe -remote-debugging-port=12345

In CEF 1 developer tools was accessible through window menu, in CEF 3 you access it through mouse context menu.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Using DevTools with CEF3

Postby Mayhew » Wed Jan 30, 2013 6:57 pm

I have the dev tools working but after reading this decided to try passing false to GetDevToolsURL() to use the chrome-devtools schema and now the dev tools window always appears blank. Is there something different I need to do to use that schema? I'm currently just executing "window.open" via javascript with the returned URL.
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Re: Using DevTools with CEF3

Postby magreenblatt » Wed Jan 30, 2013 6:59 pm

Mayhew wrote:I have the dev tools working but after reading this decided to try passing false to GetDevToolsURL() to use the chrome-devtools schema and now the dev tools window always appears blank. Is there something different I need to do to use that schema? I'm currently just executing "window.open" via javascript with the returned URL.

You can't use window.open for chrome-devtools due to security restrictions.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Using DevTools with CEF3

Postby Mayhew » Wed Jan 30, 2013 7:57 pm

Okay, makes sense. I dug a bit further and see your LaunchExternalBrowser() method in the CefClient app so I will try that.
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 191 guests