Remote debug, get remote session ID of the page

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Remote debug, get remote session ID of the page

Postby napishu » Sat Oct 18, 2014 8:58 am

Hello. I'm trying to understand where generated the json file http://localhost:9222/json with inspectable pages.


Brackets (code editor) CEF app generated json file like this (for example 2 open window with the same open file):

Code: Select all
[ {
  [ {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9234/devtools/page/708612f03a79347c42e53d27eeca9dc4",
   "faviconUrl": "",
   "id": "708612f03a79347c42e53d27eeca9dc4",
   "thumbnailUrl": "/thumb/708612f03a79347c42e53d27eeca9dc4",
   "title": "main.js - Brackets",
   "type": "page",
   "url": "file:///D:/PROGRAMS/Dev/Brackets/www/index.html",
   "webSocketDebuggerUrl": "ws://localhost:9234/devtools/page/708612f03a79347c42e53d27eeca9dc4"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9234/devtools/page/2dcbabfb06f5aafac87c63bc79eaa4d0",
   "faviconUrl": "",
   "id": "2dcbabfb06f5aafac87c63bc79eaa4d0",
   "thumbnailUrl": "/thumb/2dcbabfb06f5aafac87c63bc79eaa4d0",
   "title": "main.js - Brackets",
   "type": "page",
   "url": "file:///D:/PROGRAMS/Dev/Brackets/www/index.html",
   "webSocketDebuggerUrl": "ws://localhost:9234/devtools/page/2dcbabfb06f5aafac87c63bc79eaa4d0"
} ]



So, how from cef app get the id of current window? Can I use the api to get id? And where this json file generated?

Thank you
napishu
Newbie
 
Posts: 2
Joined: Sat Oct 18, 2014 8:23 am

Re: Remote debug, get remote session ID of the page

Postby magreenblatt » Sat Oct 18, 2014 6:09 pm

It comes from the DevTools remote debugger. Run with the '--remote-debugging-port=XXXX' command-line flag. See also https://developer.chrome.com/devtools/d ... r-protocol.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: Remote debug, get remote session ID of the page

Postby napishu » Sun Oct 19, 2014 3:27 am

magreenblatt wrote:It comes from the DevTools remote debugger. Run with the '--remote-debugging-port=XXXX' command-line flag. See also https://developer.chrome.com/devtools/d ... r-protocol.


Sorry. Comes what? You do not understand me. I already have access to the json file. How get from active focused windows data for this windows from this json file?

Problem that i don't know how to get information from json file for current focused window. When i open new window - in json file this new window will be listed first. But it is for the newly opened window. Make another window active and I can not get the information from json file on this focused window.
napishu
Newbie
 
Posts: 2
Joined: Sat Oct 18, 2014 8:23 am

Re: Remote debug, get remote session ID of the page

Postby magreenblatt » Sun Oct 19, 2014 10:00 am

You could use the window's url or title, provided they're different between windows. Why do you need to get json info for the focused window?
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 11 guests