Bug 244814

Summary: Web Inspector: incorrect line numbers when using esbuild sourcemaps
Product: WebKit Reporter: Sergey Rubanov <chi187>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: inspector-bugzilla-changes, pangle, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: All   
OS: All   

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 ***