Open
Bug 1517625
Opened 6 years ago
Updated 2 years ago
Source maps and referenced source do not seem to reload on dynamically re-loading javascript
Categories
(DevTools :: Debugger, defect, P3)
DevTools
Debugger
Tracking
(Not tracked)
NEW
People
(Reporter: jlast, Unassigned)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
(deleted),
image/png
|
Details |
What steps will reproduce the problem? 1. Load a page which in turn loads a javascript file with a sourceMappingURL epilogue. 2. Reload the javascript file dynamically using a script tag with a unigue url to circumvent caching. .ie /js/core.js?rel={timestamp} 3. view source (or throw an error) in DevTools and see that the "source" view is still referring to the older version of the source code. What is the expected result? I would prefer that the view of the source mapped source code display the current source code. What happens instead? The source view displays the older source and not the current source. More information: I use and am the author of a live development workflow for ClojureScript. This workflow reloads javascript dynamically. You can learn more about it here: http://rigsomelight.com/2014/05/01/interactive-programming-flappy-bird-clojurescript.html Further details: When a page loads my unoptimized google closure compliant code is loaded with a goog.require(); So /js/compiled/out/example/core.js is loaded and it has an epilogue //# sourceMappingURL=core.js.map This first loading of the file works fine and the source map is correct. When I reload this file with goog.net.jsloader.load('/js/compiled/out/example/core.js?rel={timestamp here}') The newly created source map in dev tools for this file doesn't get reloaded. It doesn't even get requested. This is the discussion on the dev tools forum: https://groups.google.com/forum/?fromgroups=#!topic/google-chrome-developer-tools/rjaGvik3H6k This bug is also tracked in chromium https://bugs.chromium.org/p/chromium/issues/detail?id=438251#c29
Reporter | ||
Updated•6 years ago
|
Blocks: dbg-sources
Priority: -- → P3
Comment 1•6 years ago
|
||
I need to try out the STR in comment 0, but earlier today I tried out the STR in comment 21 of the chromium bug, and that one *did* work mostly correctly in firefox. Modifying one of the original source-mapped files caused both the webpage to update (via the hot-reloading stuff going on under the hood) and the editor tab in the devtools to update with the new contents of that original file. The only problem was that the devtools still have entries for the old versions of the file in the sources pane; clicking these will update the tab to one of those older versions of the file and there isn't any indication as to which is which.
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
I don't think we can solve the multiple Layout.js
files in the tree without help from the hot reloading tool.
Dan, would you be open to testing and making sure we're in good shape?
Flags: needinfo?(dan.abramov)
Comment 4•2 years ago
|
||
Clear a needinfo that is pending on an inactive user.
For more information, please visit auto_nag documentation.
Flags: needinfo?(dan.abramov)
Updated•2 years ago
|
Blocks: dbg-sourcemap
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•