Chrome needs to be refreshed before javascript files are shown in the sources tab
Reported by
davidter...@gmail.com,
Aug 14 2016
|
||||
Issue description
Chrome Version : 52.0.2743.116
OS Version: OS X 10.11.5
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
Firefox 4.x:
IE 7/8/9:
What steps will reproduce the problem?
1. Download and unzip the attached test_project.zip
2. Open the index.html in Chrome
3. Open the dev tools and switch to sources
What is the expected result?
3. test.js is shown in the sources tab
What happens instead of that?
3. test.js is not shown until refresh. test.js is executed (the output of console.log statements are shown in the console even though test.js is not shown in the sources tab).
gif and test project attached.
UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
,
Aug 15 2016
After test.js starts showing up, closing and re-opening DevTools seems to remove it again. Strangely, if you put a setTimeout() in test.js, it seems to always be listed in Sources. kozy@, is this something related to V8 trying to determine which files are not needed?
,
Aug 15 2016
Another note: when I refresh multiple times, I get an error in the terminal:
TypeError: Cannot read property 'lastIndexOf' of undefined TypeError: Cannot read property 'lastIndexOf' of undefined
at Function.WebInspector.Script._reportDeprecatedCommentIfNeeded (chrome-devtools://devtools/bundled/sdk/Script.js:100:24)
at WebInspector.Script.didGetScriptSource (chrome-devtools://devtools/bundled/sdk/Script.js:182:33)
at callback (chrome-devtools://devtools/bundled/sdk/InspectorBackend.js:621:58)
at Object.dispatchResponse (chrome-devtools://devtools/bundled/sdk/InspectorBackend.js:662:18)
at WebInspector.MainConnection.dispatch (chrome-devtools://devtools/bundled/sdk/InspectorBackend.js:352:41)
at WebInspector.MainConnection._dispatchMessage (chrome-devtools://devtools/bundled/main/Connections.js:32:14)
at WebInspector.Object.dispatchEventToListeners (chrome-devtools://devtools/bundled/common/Object.js:110:35)
at innerDispatch (chrome-devtools://devtools/bundled/host/InspectorFrontendHost.js:520:54)", source: chrome-devtools://devtools/bundled/host/InspectorFrontendHost.js (522)
,
Aug 22 2016
Note that stack from #c3 cannot be observed in 52.0.2743.116, so there should be another cause.
,
Aug 22 2016
Thanks for repro! I uploaded CL to fix issue mentioned in #3. Original issue is related to way how V8 collects scripts. Script can be collected after execution if there is no reference to it (setTimeout adds a reference from blink). When DevTools try to fetch scripts from V8 storage while opening, it's already collected. So work as intended. Please add something bigger into your script or reload page with DevTools. I'll mark it as WontFix as soon as my CL for #3 will be landed.
,
Aug 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1fe5f66561a4f4f081435ab686f3145663b91a0e commit 1fe5f66561a4f4f081435ab686f3145663b91a0e Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Tue Aug 23 01:20:40 2016 [DevTools] Add error check before _reportDeprecatedCommentIfNeeded call BUG= 637609 R=dgozman@chromium.org Review-Url: https://codereview.chromium.org/2264013004 Cr-Commit-Position: refs/heads/master@{#413617} [modify] https://crrev.com/1fe5f66561a4f4f081435ab686f3145663b91a0e/third_party/WebKit/Source/devtools/front_end/sdk/Script.js
,
Aug 23 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by erikc...@chromium.org
, Aug 15 2016