Coverage: download and resolve sourcemaps
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 1.9.0
- Platform / OS version: win32
- Node.js version: 8.11.1
What steps will reproduce the problem?
Building a simple TypeScript/React project with parcel-bundler
creates index.html
and index.1234.js
that has a reference to index.1234.map
sourcemap. The sourcemap even includes the original sources embedded, nice!
Opening DevTools you can see the sourcemaps loaded correctly, with all the original sources displayed, breakpoints working etc.
Exporting puppeteer
coverage with page.coverage.startJSCoverage()
/page.coverage.stopJSCoverage()
only shows raw unprocessed coverage with sourcemaps ignored.
What is the expected result?
Sourcemaps resolved as normal by DevTools. The coverage coming out to include url
and text
for the original files, not raw sources. The ranges to relate to the corresponding resolved ranges in the original files.
What happens instead?
Sourcemaps show url
and text
of the processed bundled file, which was built from dozens of other files. Ranges are correct ranges in the raw file, of course.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:13 (3 by maintainers)
Top GitHub Comments
I fully agree that nowadays most of the apps are bundled with webpack, parcel, rollup or any other bundler and coverage without sourcemap support is not very useful.
Is this attempt to support this abandoned or there is still hope that it will be addressed soon?
This shouldn’t have been closed. This is a very needed feature.