NEW 142123
Web Inspector: sourceURL links should take you to the sourceURL resource, not original resource
https://bugs.webkit.org/show_bug.cgi?id=142123
Summary Web Inspector: sourceURL links should take you to the sourceURL resource, not...
Nikita Vasilyev
Reported 2015-02-27 19:08:02 PST
Created attachment 247582 [details] Works in Chrome DevTools, broken in WebKit Inspector I received a report from a person using http://gaearon.github.io/react-hot-loader/, which in turn uses Webpack, a popular module loader. All the error locations in the WebKit Inspector console were either missing or wrong. The problems is in the broken sourceURL. index.html: <script src="main.js"></script> <script> eval("console.log('eval worked');\n\ //# sourceURL=inline.js") </script> main.js: console.log("sourceURL.js loaded"); //# sourceURL=external.js
Attachments
Works in Chrome DevTools, broken in WebKit Inspector (59.22 KB, image/png)
2015-02-27 19:08 PST, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2015-02-27 19:08:26 PST
Joseph Pecoraro
Comment 2 2015-03-17 16:20:36 PDT
This is not a regression. The links work, they just don’t take you to the sourceURL named resource, and instead take you to the real resource. A valid location, just not the ideal location. I may be wrong, but I believe in Chrome, v8 parses the sourceURL comment and uses that in the JavaScript engine. So it would pass to the frontend the sourceURL. For us, any url:line:column our frontend gets we can compute where we want to show it.
Nikita Vasilyev
Comment 3 2016-08-03 14:45:43 PDT
Still relevant. Reduction: http://nv.github.io/webkit-inspector-bugs/142123_source-maps/ (So you don't have to copy/paste code from the bug description.)
Note You need to log in before you can comment on or make changes to this bug.