question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to create a sub CDP client of `const client = await CDP({ target: webSocketDebuggerUrl })`?

See original GitHub issue

Im creating a new CDP client via const client = await CDP({ target: webSocketDebuggerUrl });.

How can I create a “sub client” for this created CDP client with a specified target id (like “25B9A14AD6A1DA9F2A2539874E03A751”)? (The browser is indeed remote and accordingly 127.0.0.1 and 9222 cannot work.)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:39 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
cyrus-andcommented, Oct 5, 2022

Wow, can’t remember how many of these race-conditions I had, but they’re frustrating.

At least Node.js itself is single-threaded… 😛

Cheers mate, glad to help. Good luck!

0reactions
0x7357commented, Oct 5, 2022

That’s what I’m doing now. And it’s finally working! Wow, can’t remember how many of these race-conditions I had, but they’re frustrating. Thanks for your time @cyrus-and ! You helped a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started With Chrome DevTools Protocol - GitHub
When client wants to interact with a target using CDP, it has to first attach to the target using Target.attachToTarget command. The command...
Read more >
How to use the chrome-remote-interface.List function in ... - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately. Enable here ... _tabs.push(tab); client...
Read more >
cdp
Package cdp provides type-safe bindings for the Chrome Debugging Protocol (CDP), ... To connect to a debug target, a WebSocket debugger URL is...
Read more >
Puppeteer documentation - DevDocs
Emitted when a target is created, for example when a new page is opened by ... (async () => { const browser =...
Read more >
Using Chrome Devtools Protocol with Puppeteer
The first step is to have Puppeteer start a CDP session with the target page. ... const client = await page.target(). ... const...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found