Skip to content

Import source map URLs from Chrome DevTools traces#6190

Merged
canova merged 1 commit into
firefox-devtools:mainfrom
canova:chrome-sources
Jul 16, 2026
Merged

Import source map URLs from Chrome DevTools traces#6190
canova merged 1 commit into
firefox-devtools:mainfrom
canova:chrome-sources

Conversation

@canova

@canova canova commented Jul 16, 2026

Copy link
Copy Markdown
Member

Main | Deploy preview

Fixes #6189.

Chrome traces recorded with the "disabled-by-default-devtools.v8-source-rundown" category (enabled by default in the DevTools Performance panel) emit a ScriptCatchup event per parsed script that declares the script's source map URL.

This way we will be able to apply source maps to them with the "apply sourcemaps" button later on.

To test it, drag and drop the trace that I linked in the issue. Currently there is no visible changes, but you can look at the profile data from the devtools console. Execute this before and after this fix:

The profile in the issue: Trace-20260715T220108.json.gz

// this should contain correct integer values now instead of nulls.
profile.shared.sources.sourceMapURL
// and this should show proper source map relative URLs as strings
profile.shared.sources.sourceMapURL.map(s => profile.shared.stringArray[s])

@canova
canova requested review from fatadel and mstange July 16, 2026 09:02
@canova
canova force-pushed the chrome-sources branch 2 times, most recently from 9d61cf7 to f09536e Compare July 16, 2026 09:06
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.63%. Comparing base (a909fb4) to head (54ca5ab).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6190      +/-   ##
==========================================
- Coverage   83.64%   83.63%   -0.01%     
==========================================
  Files         346      346              
  Lines       37143    37174      +31     
  Branches    10408    10431      +23     
==========================================
+ Hits        31067    31090      +23     
- Misses       5648     5656       +8     
  Partials      428      428              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/profile-logic/import/chrome.ts

@fatadel fatadel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, really nice!

Chrome traces recorded with the
"disabled-by-default-devtools.v8-source-rundown" category (enabled by
default in the DevTools Performance panel) emit a ScriptCatchup event
per parsed script that declares the script's source map URL.

This way we will be able to apply source maps to them with the "apply
sourcemaps" button later on.
@canova
canova enabled auto-merge (squash) July 16, 2026 13:49
@canova
canova merged commit 4c04687 into firefox-devtools:main Jul 16, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chrome importer should import each source with sourceMapURL if it exists

2 participants