The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Stop JavaScript coverage with await page.coverage.stopJSCoverage() after the page interactions you want to measure. It ends collection and returns an array of coverage reports. Coverage must first be started on that page.
Stop JavaScript coverage
A minimal Puppeteer flow is to start coverage, load and exercise the page, then stop coverage and retain the returned reports:
await page.coverage.startJSCoverage();
await page.goto('https://example.com');
// Perform the interactions whose JavaScript usage you want to collect.
const jsCoverage = await page.coverage.stopJSCoverage();
startJSCoverage() and stopJSCoverage() are asynchronous; await them so collection has started before navigation or interaction, and so the report is available when stopping. See the Puppeteer Coverage API.
What the stop call returns
stopJSCoverage() resolves to an array with one report entry for each reported script. Entries include script text and executed ranges, which you can inspect or pass to a coverage conversion tool. The stop call marks the end of collection; it does not reconstruct data Chrome has already discarded.
#1 Best Overall
Collect coverage across multiple pages
The resetOnNavigation option defaults to true. Setting it to false does not guarantee that coverage survives navigation: Chrome can discard the prior page’s JavaScript execution environment and its coverage data. For a multi-page journey, stop before leaving each page, start a fresh collection on the next page, and merge the returned entries in your application.
- Start JavaScript coverage on the current page.
- Perform the interactions to measure, then call
stopJSCoverage()before navigating away. - Navigate to the next page and start coverage again.
- Combine the per-page report entries in your own reporting pipeline.
Include anonymous scripts when needed
By default, coverage omits scripts without an associated URL, including code created with eval or new Function. Start collection with reportAnonymousScripts: true to include them:
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
await page.coverage.startJSCoverage({ reportAnonymousScripts: true });
Puppeteer documents generated URLs in the form debugger://VM for these scripts unless a //# sourceURL comment provides a URL. Enable this option when anonymous code matters to your analysis; otherwise, the default avoids those entries.
Read or export the coverage data
Coverage ranges describe executed portions of each script. Puppeteer’s API example calculates used bytes by summing range.end - range.start - 1 across a script’s ranges, then compares that total with the script text length. Treat that as a range-based byte calculation, not a complete measure of runtime cost or performance.
Recommended Free Tools
Rank #3
For an Istanbul-consumable format, the API reference points to puppeteer-to-istanbul. JavaScript and CSS coverage are separate collections: stopping CSS coverage requires its own call, stopCSSCoverage().
Troubleshooting
- The stop call fails or there is no report. Start JavaScript coverage on the same page first, and await the start call before attempting to stop it.
- Coverage seems missing after navigation. Do not rely on
resetOnNavigation: falseto preserve execution data. Stop before navigation, restart on the next page, and merge the reports. - Code created with
evaldoes not appear. Start coverage withreportAnonymousScripts: true; anonymous scripts are excluded by default. - You expected CSS entries in the JavaScript report. Start and stop CSS coverage separately;
stopJSCoverage()returns JavaScript coverage.
Or skip the browser setup
If your goal is a screenshot rather than a JavaScript coverage report, ScreenshotNeo returns a screenshot or PDF from one request, without setting up Puppeteer. Its endpoint is not a replacement for Puppeteer’s coverage API.
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for request options. It removes cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server lets AI agents use screenshot tools. The free plan includes 1,000 shots per month with no card required; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




