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.

Support question - always launch Chrome in new tab in existing window, if existing window exists

See original GitHub issue

Hey all, will try to get straight to the point - I am planning to use Puppeteer to launch in {headless: false} mode.

(a) I am looking to launch Puppeteer as a new tab in an existing window, using some flag (b) I’d like the ChromeDevTools view to open automatically, using some flag

I checked out SO for any existing questions on this, didn’t see any: https://stackoverflow.com/questions/tagged/puppeteer

So my question is - does Puppeteer provide us with flags that can force an existing window to be used instead of launching in a new window, and to force dev tools to open?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ORESoftwarecommented, Jan 12, 2018

@aslushnikov ok homie, I am diggin’ your style, but I now have some beef

I have this:

const util = require('util');
const puppeteer = require('puppeteer');

(async () => {

  const b = await puppeteer.launch({
    headless: false,
    devtools: true, 
    args: ['--remote-debugging-port=9222']
  });

  const browser = await puppeteer.connect({
    browserWSEndpoint:   b._connection._url,   //`ws://${host}:${port}/devtools/browser/<id>`,
    ignoreHTTPSErrors: false
  });

})();

My question is, why do I need to use b._connection._url … 2 properties with underscores.

Something is wrong. Is there a better way to grab the connection url?

1reaction
aslushnikovcommented, Jan 12, 2018

@ORESoftware 1.0.0 was published a few hours ago; try installing one more time

Read more comments on GitHub >

github_iconTop Results From Across the Web

always launch Chrome in new tab in existing window ... - GitHub
(a) I am looking to launch Puppeteer as a new tab in an existing window, using some flag (b) I'd like the ChromeDevTools......
Read more >
Force Chrome to open new pages in new window, not tab ...
Solution · Go to HKEY_CLASSES_ROOT\http\shell\open\command · You should see one key, named (Default) . Double click this to get an editing popup. ·...
Read more >
Open link in new window or focus to it if already open
For this code window.open('www.sample.com','mywindow').focus(). Chrome 20 opens a new tab, and focuses on subsequent open() calls regardless if focus() is ...
Read more >
113572 - New Chrome window (from Quick Launch or Pinned ...
2. Shift + Click the pinned Chrome launcher on your toolbar and open a new window. Or if you open Google Chrome via...
Read more >
Use tabs in Chrome - Computer - Google Support
Open a new tab or window. Open a new tab.
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