I have a nodejs app that uses puppeteer to take screenshots. I have enabled the dumpio setting when launching puppeteer, so that the content of the browser console is dumped to my console (nodejs app):
const browser = await puppeteer.launch({
dumpio: true
});
This works fine, but I would like to gather ALL messages that you can see in Chrome devtool's console, such as network requests.
There is a Debugging Tips section in the docs that indicates that is should be possible:
- Enable verbose logging - internal DevTools protocol traffic will be logged via the debug module under the puppeteer namespace.
# Basic verbose logging env DEBUG="puppeteer:*" node script.js # Protocol traffic can be rather noisy. This example filters out all Network domain messages env DEBUG="puppeteer:*" env DEBUG_COLORS=true node script.js 2>&1 | grep -v '"Network'
But when I set the environment variable DEBUG="puppeteer:*" in my nodejs app, I do not get that extra info logged to the console.
Is there something that I'm missing or that I'm not doing right?