Automatically choose debug port
Posted:
Fri Dec 01, 2017 3:07 pm
by dtarkows
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?
Re: Automatically choose debug port
Posted:
Fri Dec 01, 2017 3:40 pm
by magreenblatt
It's intentionally not supported by CEF currently. See the comment here:
https://bitbucket.org/chromiumembedded/ ... gate.cc-73However, 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.
Re: Automatically choose debug port
Posted:
Mon Dec 04, 2017 4:50 pm
by dtarkows
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.