I've tried enabling device discovery, remote targets and see such remote targets pop up generally in chrome's own discovery somewhere in the form of
<devicename>:chrome_devtools_remote:<targetid> or when explicitly enabling port forwarding, something like
localhost:9222:<targetid> but I cant seem to find a way to connect from my extension (it always fails with a "runtime.lastError: No target with given id ..." message, even though in general I can see the browser itself is able to connect to it and inspect (naturally!). I've been snooping around the
Protocol Monitor in Chrome quite a bit in the hope of gaining some clue but so far, haven't really been able to crack this mystery :(
Is this even possible, or am I even going in the right direction? I am fairly new to chrome extensions and CDP, so any guidance, alternate ideas, direction, hacks or workaround are highly appreciated!
Thank you so much for your time!
- Abhishek