New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Launcher): add devtools option #953
feat(Launcher): add devtools option #953
Conversation
Personally I think this is better solved with manually adding that flag like: puppeteer.launch({args: ['--auto-open-devtools-for-tabs']}) |
9f793f3
to
9ae6779
Compare
@paulirish The bare-bone flag is a minimalistic approach yet not very convenient.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it.
lib/Launcher.js
Outdated
@@ -80,6 +80,8 @@ class Launcher { | |||
'--mute-audio' | |||
); | |||
} | |||
if (options.headless === false && options.devtools === true) | |||
chromeArguments.push('--auto-open-devtools-for-tabs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vsemozhetbyt we discussed and folks are comfortable with this. (including me. :)
can you also set options.headless = false
automatically if devtools
is true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've amended. Is it OK now?
9ae6779
to
b7f0f0f
Compare
Fixes: #864 (see #864 (comment))
Refs: https://peter.sh/experiments/chromium-command-line-switches/#auto-open-devtools-for-tabs
Unfortunately, I do not know if this option needs a test and how it should be tested if needed. Please, let me know what code should I add to the tests,