question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Coverage: download and resolve sourcemaps

See original GitHub issue

Steps 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:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

35reactions
gjovanovcommented, Sep 10, 2019

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?

18reactions
stevenvachoncommented, May 1, 2019

This shouldn’t have been closed. This is a very needed feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use a source map — Firefox Source Docs documentation
A source map is a file that maps from the transformed source to the original source, enabling the browser to reconstruct the original...
Read more >
source-map
Generates and consumes source maps. ... Start using source-map in your project by running `npm i source-map`. ... Coverage Status. NPM.
Read more >
Source maps in Node.js. Supporting the many flavors of…
Adding support for the Source Map V3 format to Node.js was an important step towards better ... Caching source maps for code coverage....
Read more >
Source Map Revision 3 Proposal
Any discrepancies should be resolved in favour of the Google Doc. Source Map Revision 3 Proposal. Better bidirectional mapping. John Lenz, Google. Nick ......
Read more >
Securely debug original code by publishing source maps ...
Learn how to publish source maps to the Azure Artifacts symbol server to ... 'hidden-source-map' : 'inline-source-map', resolve: { modules: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found