Closed mrbbot closed 1 year ago
Latest commit: 73c06dc17683ed320a7b306ed735b453608cc17d
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Hey! 👋 With cloudflare/workerd#710,
workerd
supports breakpoint debugging! Support for this in Miniflare just worked, assuming you were using a plain JavaScript worker, or you had inline source maps.workerd
doesn't know where workers are located on disk, it just knows files' locations relative to each other. This means it's unable to resolve locations of corresponding linked.map
files insourceMappingURL
comments.Miniflare does have this information though. This PR detects linked source maps and rewrites
sourceMappingURL
comments tohttp
URLs pointing to Miniflare's loopback server. This then looks for the source map relative to the known on-disk source location. Source maps'sourceRoot
attributes are updated to ensure correct locations are displayed in DevTools.This enables breakpoint debugging for compiled TypeScript with linked source maps! :tada:
Closes DEVX-872