- Open
chrome://extensions
- Enable Developer Mode (toggle is in the top right corner)
- Press
"Load unpacked"
and selectextension
folder to install extension - Open background.html of
Chrome Coverage Playground
(blue link on the extension's card) - The DevTools window will open. Here, you'll see the coverage and other data printed in the
Console
tab. - Open your page of interest. (E.g. use
example-page-to-play-with-coverage.html
in root folder) - Open extension via extension pane in upper right corner, and click V8 Coverage Playground icon.
- Follow the popup instructions
- Make sure to set target script URL to the script of interest. (E.g. your
main.js
or smth like that) - Once you hit "takePreciseCoverage" return to extension's background.html DevTools page and:
- check the coverage data highlighted on the script source
- raw json printend to console
TIP you can
right-click
andcopy
this data, to use for VSCode extension mentioned below
You can use this VSCode extension to fulfill this task