-
Notifications
You must be signed in to change notification settings - Fork 74
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
Puppeteer开发调试的4个Tip #26
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.关闭无头模式 - 有时查看浏览器显示的内容很有用。替换无头模式,使用 headless: false 启动完整版本的浏览器
2.慢下来 - slowMo 选项会将 Puppeteer 操作浏览器减慢指定的毫秒数。 这是帮助看看发生了什么的另一种方法
3.捕获控制台输出 - 你能够监听控制台事件。在 page.evaluate() 中调试代码时这也很方便
4.启用详细的日志 - 所有公共 API 调用和内部协议流量都将通过 puppeteer 命名空间下的调试模块进行记录
The text was updated successfully, but these errors were encountered: