0

Lets say I managed to get (and store) the console output, network traffic, cookies and the HTML of site A (by using an extension or/plus a script).

Now I have all these logs and want to show them on site B as if they were the actual logs of site B, meaning that if I Ctrl+Shift+I it I'd see site's A HTML, console output, etc.

One approach could be having new dev tools extensions similar to the existing ones playing my data, but having all these tabs essentially duplicated seems wrong (and like a lot of work).

Is there a simple way of doing this without creating new dev tools tabs?, like sending these logs to the existing dev tools tabs? (Elements, Network, Console, etc.).

Did some research but couldn't find and API exposing methods to feed the existing tabs.

ajaysinghdav10d
  • 1,771
  • 3
  • 23
  • 33
Felipe Pereira
  • 11,410
  • 4
  • 41
  • 45
  • There's definitely no such feature in devtools but maybe you can find an extension or an external tool for this. – wOxxOm May 13 '20 at 04:57
  • @wOxxOm could this be achieved using https://chromedevtools.github.io/devtools-protocol/ in some way?, just found out about it and seems like it allows a lot of customizations – Felipe Pereira May 13 '20 at 11:29
  • The protocol itself doesn't do anything, it's used by a client such as devtools. – wOxxOm May 13 '20 at 11:31
  • @wOxxOm yes, it seems so, question was if it would be possible to serve custom data using the same protocol so dev tools consume this data instead of the one coming from chrome itself. – Felipe Pereira May 13 '20 at 11:38
  • 1
    When devtools shows its UI it performs a lot of individual queries for various stuff via CDP so you would have to write some kind of a proxy server for the main browser (started with `--remote-debugging-port=9222` switch) that hooks all of those commands, expose it on some local port (e.g. 9223) and then open `http://localhost:9223` to load devtools UI as a web app (the front-end is javascript anyway). An alternative approach is to make a copy of devtools front-end and change the CDP endpoints it uses. – wOxxOm May 13 '20 at 11:56

0 Answers0