File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,7 +194,27 @@ Explore the [API documentation](docs/api.md) and [examples](https://github.com/G
194194
195195 await page.evaluate(() => console.log(`url is ${location.href}`));
196196
197- 4 . Enable verbose logging - All public API calls and internal protocol traffic
197+ 4 . Stop test execution and use a debugger in browser
198+
199+ - Use ` {devtools: true} ` when launching Puppeteer:
200+
201+ `const browser = await puppeteer.launch({devtools: true});`
202+
203+ - Change default test timeout:
204+
205+ jest: ` jest.setTimeout(100000); `
206+
207+ jasmine: ` jasmine.DEFAULT_TIMEOUT_INTERVAL = 100000; `
208+
209+ mocha: ` this.timeout(100000); ` (don't forget to change test to use [ function and not '=>'] ( https://stackoverflow.com/a/23492442 ) )
210+
211+ - Add an evaluate statement with ` debugger ` inside / add ` debugger ` to an existing evaluate statement:
212+
213+ ` await page.evaluate(() => {debugger;}); `
214+
215+ The test will now stop executing in the above evaluate statement, and chromium will stop in debug mode.
216+
217+ 5 . Enable verbose logging - All public API calls and internal protocol traffic
198218 will be logged via the [ ` debug ` ] ( https://github.com/visionmedia/debug ) module under the ` puppeteer ` namespace.
199219
200220 # Basic verbose logging
You can’t perform that action at this time.
0 commit comments