Source tab sometimes does not refresh when browser window is refreshed

瀏覽次數:10,837 次
跳到第一則未讀訊息

ortho...@gmail.com

未讀,
2014年2月19日 下午2:34:212014/2/19
收件者:google-chrome-...@googlegroups.com
I wonder if someone can explain an irritating mystery about the Chrome debugger.

My typical debugging workflow is:

1. Load a page in the browser.
2. Open Developer Tools.
3. Select the Sources tab; open the HTML file; open the JavaScript file.
4. Set a breakpoint in the JavaScript file.
5. Reload the browser page. Loading stops at the breakpoint.
6. Debug until I find a problem.
7. Fix the problem (in my usual code editor, not in Developer Tools) and save the file.
8. Return to step 5.

Normally reloading the HTML file reloads the JavaScript file. Sometimes, though, Developer Tools continues to show the old version of the file. Then only way I can make it refresh is to close Developer Tools and start over.

What makes it do that, and how can I make it stop without resorting to the nuclear option?

John J Barton

未讀,
2014年2月19日 下午2:42:182014/2/19
收件者:Google Chrome Developer Tools
Did you try Devtools > Options (gear top right) > General > Disable cache (while DevTools is open) ?


--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/3b0f30f7-d2d9-4445-845f-79804ea22014%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ivo Dachev

未讀,
2015年5月12日 上午9:56:272015/5/12
收件者:google-chrome-...@googlegroups.com、ortho...@gmail.com
I am having the same problem, when using both FF and Chrome. Cache is disabled. What else could be?

Thanks,

Andrey Lushnikov

未讀,
2015年5月12日 上午10:32:422015/5/12
收件者:google-chrome-...@googlegroups.com、ortho...@gmail.com
Make sure you have "Disable cache" setting off

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.

praci...@gmail.com

未讀,
2015年10月30日 上午11:35:392015/10/30
收件者:Google Chrome Developer Tools、ortho...@gmail.com、lush...@chromium.org
Hi,

I have the exact same problem.  This occurs even if I disable the cache manually (even though my application already applies no-cache policies).

Chrome Version: 46.0.2490.80 m

Here is the explanation of my problem (which is almost the same):
  1. Open Sources tab of the developer tool
  2. Add a breakpoint to a JavaScript file (foo.js)
  3. Execute action to hit the breakpoint
  4. Finish the execution
  5. Modify the JavaScript file code and save
  6. Refresh the web app (keeping the developer tool open)
  7. Verify source of the JavaScript file
    • The source didn't updated itself
    • I cannot add new breakpoints in the file
  8. Execute action to hit the breakpoint added in step #2
    • The breakpoint is hit and the source file has the lastest code, but if I check in the right-side panel under Breakpoints, I can see that instead of being on foo.js, the breakpoint is actually on VM000000 foo.js
Note
Although the foo.js file didn't update in the Sources tab, if I go in the Resources tab and find foo.js, I can see that the source has been updated.

Workaround
A workaround that I found (but that is quite annoying) is to close the developper tool before I refresh the page.  After the refresh, when I re-open the developer tool and go in the sources tab, the foo.js file contains the latest source code.

Thanks,
Patrick Racicot

On Tuesday, May 12, 2015 at 10:32:42 AM UTC-4, Andrey Lushnikov wrote:
Make sure you have "Disable cache" setting off

On Tue, May 12, 2015 at 4:56 PM Ivo Dachev <dach...@gmail.com> wrote:
I am having the same problem, when using both FF and Chrome. Cache is disabled. What else could be?

Thanks,

On Wednesday, February 19, 2014 at 11:34:21 AM UTC-8, ortho...@gmail.com wrote:
I wonder if someone can explain an irritating mystery about the Chrome debugger.

My typical debugging workflow is:

1. Load a page in the browser.
2. Open Developer Tools.
3. Select the Sources tab; open the HTML file; open the JavaScript file.
4. Set a breakpoint in the JavaScript file.
5. Reload the browser page. Loading stops at the breakpoint.
6. Debug until I find a problem.
7. Fix the problem (in my usual code editor, not in Developer Tools) and save the file.
8. Return to step 5.

Normally reloading the HTML file reloads the JavaScript file. Sometimes, though, Developer Tools continues to show the old version of the file. Then only way I can make it refresh is to close Developer Tools and start over.

What makes it do that, and how can I make it stop without resorting to the nuclear option?

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.

Valentin Tayursky

未讀,
2017年5月22日 上午11:22:502017/5/22
收件者:Google Chrome Developer Tools、ortho...@gmail.com、lush...@chromium.org
Hi guys,
I have the same issue... 
It makes me really mad. I can see new version of the script in the Source/Network/Application tabs, but real application uses 'cached version' and I can not change it...

пятница, 30 октября 2015 г., 18:35:39 UTC+3 пользователь praci...@gmail.com написал:

Tim Chase

未讀,
2017年8月9日 中午12:26:472017/8/9
收件者:Google Chrome Developer Tools、ortho...@gmail.com、lush...@chromium.org
I found a workaround.  If you open the js file in the browser (http://whatever.com/yourfile.js) and refresh the page it will load the new JS into the cashe.  

Flavio Portela

未讀,
2017年8月17日 下午5:45:392017/8/17
收件者:Google Chrome Developer Tools、ortho...@gmail.com
Same issue here, I have the cache off and I also tried with a fresh installation of chrome with no success

José Pedro Silva

未讀,
2017年8月23日 清晨7:39:432017/8/23
收件者:Google Chrome Developer Tools、ortho...@gmail.com
Hi!

I have the same issue, since chrome v60. Until then it was working just fine.

Best,

Diego Marafetti

未讀,
2017年9月6日 上午10:11:352017/9/6
收件者:Google Chrome Developer Tools、ortho...@gmail.com
I also have the same issue since v60 too. Using chrome for os x. Source tab is not being refreshed after a page reload. This is definitely a bug and not a cache configuration issue. If I close and open the dev tools the source tab is populated with the new change so the browser does loads the updated file. 

Diego Marafetti

未讀,
2017年9月6日 上午10:14:562017/9/6
收件者:Google Chrome Developer Tools、ortho...@gmail.com
its solved in lastest version Version 61.0.3163.79 (Official Build) (64-bit) OS X

mig...@zappysoftware.com

未讀,
2017年10月18日 下午1:18:062017/10/18
收件者:Google Chrome Developer Tools
V62 and for me the issue is still present!

mih...@gmail.com

未讀,
2017年10月20日 下午2:45:202017/10/20
收件者:Google Chrome Developer Tools
Version 62.0.3202.62 (Official Build) (64-bit) behaves the same for me. I'm pretty sure I did not notice this before, even though the report seems quite old (2014) and I'm using Chrome dev tool daily.

I can see in the network tab of the dev tool window, that the file is indeed re-transferred (I have the "disable cache" checkbox checked) and in preview of the file I can see my changed to the page.

In my case it's not a stand alone js file, it's a script embedded via <script> tag in the main page, so the workaround presented by Tim Chase above, does not apply. Closing dev tool window, refreshing the page and reopening dev tool (as suggested by praci...@gmail.com) does seem to work.

mig...@zappysoftware.com

未讀,
2017年10月25日 清晨7:12:032017/10/25
收件者:Google Chrome Developer Tools
I also have this issue, please fix this ASAP, i lose tons of hours debugging because the window is not showing the real code, so breakpoints, are not true, and does not relate to the actual code im doing.
I have cache disabled and have to reload the window, and close the dev tools or some crazy combos, to make it work, this is not good.

PhistucK

未讀,
2017年10月25日 上午11:05:112017/10/25
收件者:Google Chrome Developer Tools
You can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

You can reply with a link to the found or created issue and might get triaged (and fixed) faster.

Thank you.



PhistucK

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.

kingk...@gmail.com

未讀,
2019年4月26日 清晨5:50:462019/4/26
收件者:Chrome DevTools
I have been facing this problem for a few years and am still facing it.

To overcome it, I have to close CDT, refresh the page, open CDT again.  Sometimes this works, sometimes it doesn't.

Will be nice to know what is wrong and the proper way to overcome it.



回覆所有人
回覆作者
轉寄
0 則新訊息