Issue metadata
Sign in to add a comment
|
Mapping to network resource not working when file names are different
Reported by
damian.t...@gmail.com,
Mar 21 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 Steps to reproduce the problem: 1. Add folder to workspace with the source files. In this case JS files. 2. Right-click in a file from workspace and "map to network resource...". In the list of files select the one that "matches" by name. In this case the files from the server have a prefix in the name, so names donn't match one by one. Eg. file '/js/011fdd2_clients_controller_1.js' is mapped to 'http://myserver/js/011fdd2_clients_controller_1.js' in the web server. 3. Because names are different, files are not mappped. What is the expected behavior? No. The expected behaviour is to have both files mapped, even if they have different names. What went wrong? Files are not mapped. In Settings -> workspace there is an entry where files seem to be mapped but in the sources tab you can still see it (when it is really mapped it disappears from the list from the webserver part). Did this work before? Yes Not sure, but in the previous version (48). Chrome version: 49.0.2623.87 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 21.0 r0 - with the same names it works. - tested also in Canary: Versión 51.0.2686.0 canary (64-bit)
,
Apr 21 2016
Yeah, but since Chrome 49 files with source maps presents with postfix sm. For example, instead test.js -> test.js [sm] And due to this behaviour, I can't mapping remote files to workspace, because different file names.
,
Apr 21 2016
,
May 5 2016
Can you remove [sm] postfix from remote files for fixing regression?
,
May 5 2016
In `WebInspector.SourceMap.prototype._parseMap` method remove:
if (url === this._compiledURL && hasSource)
url += WebInspector.UIString(" [sm]");
,
Jan 25 2017
Any updates if there are plans to implement a fixe for file <==> network resource mapping? I keep an old version of Chrome 48 around to map a local files to a network resource. Then when using latest Chrome the file to network resource mapping stays as desired and LiveEdit modifies the local file in place. The attached image shows the first two mapped using 48, and the third one is latest version leaving the "/".
,
Feb 9 2017
Chrome 56 broken still!
It even not working with "Persistence 2.0"
WTF?
Now need patch `SDK.TextSourceMap.prototype._parseSources` by removing:
if (url === this._compiledURL && source)
url += Common.UIString(' [sm]');
Why you keep this dirty hack, where file name patches with " [sm]" postfix, while you can visualize it with css!
,
Feb 13 2017
,
Feb 17 2017
#6: try switching the "Persistence 2.0" experiment on. It should solve your mapping issues. #7: we'll try to fix the issue under the "Persistence 2.0" experiment. Started: https://codereview.chromium.org/2698183003/
,
Feb 17 2017
I enabled Persistence 2.0. The workspace settings now says: "Mappings are inferred automatically via the 'Persistence 2.0' experiment." When I look at the Sources tree, the Chrome 48 mapping of a network resource to a local file shows, but I don't see where / how to apply new "network resource" to "local file" mappings.
,
Feb 17 2017
@caveman: first of all, I'd recommend using experiments on the Chrome Canary - they are better refined. When you say you don't see where and how to apply new "network resource" to "local file" mappings - what do you mean?
,
Feb 17 2017
@lushnikov, thanks for the reply.
In the old versions of Chrome, you could either:
1) right click on a local file and "map to a network resource"
or
2) right click on a network resource and "map to a local file"
In the image, the little green checkmark was mapped via Chrome 48. The latest versions respect that mapping that I made using 48, but in current Chrome, I don't see how to set a mapping for individual network resources to files or vice versa.
,
Feb 17 2017
@cavemansspa: the mappings which you were establishing via "map to a network resource" / "map to a local file" are not used in Persistence2.0. Instead, we try to infer them automatically, based on the file names and certain other factors. It would be really nice if you try it out and see if it works for your setup! Could you please give it a shot to Chrome Canary 58?
,
Feb 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9614d5a7ab4b1ea2de28ba38edb198c4e7e2a93e commit 9614d5a7ab4b1ea2de28ba38edb198c4e7e2a93e Author: lushnikov <lushnikov@chromium.org> Date: Sat Feb 18 06:36:45 2017 DevTools: teach automapping to map complex sourcemap setups. Consider a sourcemap with inlined sources, which has one of the source urls equals to the compiled url. In this case, we append the ' [sm]' suffix to the source URL so that the UISourceCode would not clash in the Workspace. (see crbug.com/562870 ). This, however, kills the ability to map this file to the workspace. This patch exploits the ability of automapping to handle query parameters. By appending '? [sm]' instead of just ' [sm]', the automapping is able to establish a binding based on the source size. BUG= 596422 , 605548 R=dgozman Review-Url: https://codereview.chromium.org/2698183003 Cr-Commit-Position: refs/heads/master@{#451430} [add] https://crrev.com/9614d5a7ab4b1ea2de28ba38edb198c4e7e2a93e/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-sourcemap-nameclash-expected.txt [add] https://crrev.com/9614d5a7ab4b1ea2de28ba38edb198c4e7e2a93e/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-sourcemap-nameclash.html [add] https://crrev.com/9614d5a7ab4b1ea2de28ba38edb198c4e7e2a93e/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/resources/sourcemap-name-clash/out.js [add] https://crrev.com/9614d5a7ab4b1ea2de28ba38edb198c4e7e2a93e/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/resources/sourcemap-name-clash/out.js.map [modify] https://crrev.com/9614d5a7ab4b1ea2de28ba38edb198c4e7e2a93e/third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map-expected.txt [modify] https://crrev.com/9614d5a7ab4b1ea2de28ba38edb198c4e7e2a93e/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
,
Feb 22 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by dgozman@chromium.org
, Mar 21 2016Owner: pfeldman@chromium.org
Status: Assigned (was: Unconfirmed)