Bug 244814 - Web Inspector: incorrect line numbers when using esbuild sourcemaps
Summary: Web Inspector: incorrect line numbers when using esbuild sourcemaps
Status: RESOLVED DUPLICATE of bug 235607
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari 15
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-05 09:28 PDT by Sergey Rubanov
Modified: 2022-09-20 13:23 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Rubanov 2022-09-05 09:28:32 PDT
I have a minimal example app which could be built with either Rollup (using npm run build:rollup) or esbuild (using npm run build:esbuild).
https://github.com/chicoxyzzy/esbuild-sourcemaps-safari

When I build the app with Rollup and then run the server (npm start), I can see that line of console.error points to correct line (line 7) in Safari Web Inspector
When I build the app with esbuild, it points to the wrong line (the last line of the module — line 15) in Safari Web Inspector

The line is correct for Chrome and Firefox

esbuild GitHub issue: https://github.com/evanw/esbuild/issues/2522
Comment 1 Sergey Rubanov 2022-09-05 14:21:03 PDT
Looks like it was fixed already. Safari Technology Preview 152 (Safari 16.0, WebKit 17615.1.2.3) shows correct line
Comment 2 Sergey Rubanov 2022-09-12 19:19:46 PDT
Lines are incorrect in Safari 16.0 (17614.1.25.9.10, 17614)
Comment 3 Radar WebKit Bug Importer 2022-09-12 19:20:19 PDT
<rdar://problem/99850296>
Comment 4 Sergey Rubanov 2022-09-14 16:12:43 PDT
It seems that line numbers are correct in 16.1 beta (17614.2.5, 17614)
Comment 5 Patrick Angle 2022-09-20 13:23:45 PDT

*** This bug has been marked as a duplicate of bug 235607 ***