mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs(README): Update debugging tips (#1868)
This commit is contained in:
parent
cb684ebbc4
commit
797b561013
@ -165,7 +165,7 @@ Explore the [API documentation](docs/api.md) and [examples](https://github.com/G
|
||||
1. Capture console output - You can listen for the `console` event.
|
||||
This is also handy when debugging code in `page.evaluate()`:
|
||||
|
||||
page.on('console', msg => console.log('PAGE LOG:', ...msg.args));
|
||||
page.on('console', msg => console.log('PAGE LOG:', msg.text()));
|
||||
|
||||
await page.evaluate(() => console.log(`url is ${location.href}`));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user