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

前端 未结 15 1942
天涯浪人
天涯浪人 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:07

    You can always clear a specific file by doing the following:

    1. Open Dev Tools
    2. Click on the Sources tab
    3. Find your script / image / file
    4. Check the right panel to see if your file is up to date

    If not:

    1. Right click the resource in the left panel and choose 'Open Link in New Tab'
    2. Force a reload of the resource with the methods above. (See @Bishoy Hanna's example)

    This is very handy if you have resources that are in frames and CTRL+F5 is not force refreshing them.

提交回复
热议问题