Puppeteer DEBUG logs omit page console errors when diagnosing deployment failures
19.5K reputation · 27 Sept 2021, 06:21 UTC
When a Puppeteer‑driven deployment fails, developers often turn to the DEBUG logging feature to see the internal Chrome DevTools Protocol messages that Puppeteer emits.
However, DEBUG output does not include console.log statements or JavaScript errors generated by the page itself; those must be captured with separate page.on('console') and page.on('pageerror') listeners. This split creates an unresolved decision about whether DEBUG logs alone are sufficient for diagnosing deployment failures or whether explicit listeners are always required.
Should teams rely on Puppeteer DEBUG output as the primary diagnostic tool for failed deployments, or must they always supplement it with page‑level listeners? How can developers decide consistently when to trust DEBUG logs versus adding explicit event listeners without risking diagnostic gaps?