Automatically choose debug port

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.

Automatically choose debug port

Postby dtarkows » Fri Dec 01, 2017 3:07 pm

If you start Chrome with the flag "--remote-debugging-port=0" it will automatically choose an available port and write information about the port to a known file (see https://chromedevtools.github.io/devtools-protocol/).

I can't seem to get cefclient.exe or my own application to be able to reproduce this behavior. Is something like that possible with CEF?
dtarkows
Techie
 
Posts: 10
Joined: Mon Jul 13, 2015 1:34 pm

Re: Automatically choose debug port

Postby magreenblatt » Fri Dec 01, 2017 3:40 pm

It's intentionally not supported by CEF currently. See the comment here: https://bitbucket.org/chromiumembedded/ ... gate.cc-73

However, we could add support now that we always have a user data directory (configurable via CefSettings.user_data_path) and write the file similar to Chrome. You're welcome to add an enhancement request and/or submit a PR with the fix.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Automatically choose debug port

Postby dtarkows » Mon Dec 04, 2017 4:50 pm

Thanks for the reply. I realized shortly after I posted that I was making things unnecessarily complicated and I can just choose my port directly. I don't need to have Chromium choose the port since we are all in the same process I can allow it to reuse the port that I've already opened.
dtarkows
Techie
 
Posts: 10
Joined: Mon Jul 13, 2015 1:34 pm


Return to Support Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 47 guests