Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you detail what is the embedded viewer and how/when you access it? Thanks.


With either Chrome in headless mode, or "headless_shell" (a minimal Chrome app part of the Chromium source tree), you first enable the remote debugging port (via --remote-debugging-port=9222), and then you can then simply browse to http://localhost:9222/. That web page will list the various Chrome "pages" (ie, tabs) which you can then click on. Clicking on those tabs will open the Chrome DevTools inside of Chrome, as a web app served from http://localhost:9222/.

This is the internal API that DevTools uses, and is what is referred to as the "Chrome Debugging Protocol" (ie, chromedp). Since 57+, the built in DevTools UI displays whatever the active viewport Chrome "sees" using the screencast APIs. It's just a PNG that's updated every couple hundred milliseconds with the output of Chrome's headless renderer.


Thanks, also did not quite understood what exactly was headless_shell: how to run it, pro/cons, when to use it versus chrome headless.


The documentation seems to be the source at this moment: https://chromium.googlesource.com/chromium/src/+/lkgr/headle...

Its a binary that I suppose runs the Chrome in headless mode, supports some command line options like --screenshot to take screenshots, etc.

I'm having a hard time understanding why its hanging on some runs, and how --timeout and --virtual-time-budget could help me with this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: