How to force Chrome's script debugger to reload javascript?

前端 未结 15 1925
天涯浪人
天涯浪人 2020-12-12 09:56

I really like the ability to edit javascript in the chrome debugger however, I find that it can be really problematic getting the debugger to re-fetch the JavaScript from th

15条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 10:24

    If you are making local changes to a javascript in the Developer Tools, you need to make sure that you turn OFF those changes before reloading the page.

    In the Sources tab, with your script open, right-click in your script and click the "Local Modifications" option from the context menu. That brings up the list of scripts you've saved modifications to. If you see it in that window, Developer Tools will always keep your local copy rather than refreshing it from the server. Click the "revert" button, then refresh again, and you should get the fresh copy.

提交回复
热议问题