Webstorm does not update modified JavaScript files

My HTML page links to several JavaScript files, for example:

<script type="text/javascript" src="MyClass.js"></script> 

I am debugging a WebStorm using Python SimpleHTTPServer on Windows with Chrome. I can set breakpoints in my JavaScript and WebStorm, stopping at them as expected.

However, sometimes when I make changes to my JavaScript and re-run the debugger, it runs the old code, not the updated code. If I place a breakpoint, the line on which it stops is out of sync with the place where I set the breakpoint.

How can I force update?

+6
source share
1 answer

The problem was caching Chrome (and Firefox) - perhaps this is beyond the control of WebStorm. It is solved as follows:

Chrome

  • F12 to open the developer panel, then right-click "Update on Toolbar" β†’ "Clear Cache and Reboot"

  • or; F12, to open the developer panel, the "Settings" icon in the lower right, select the "Disable cache" checkbox

Firefox

  • Install the web developer toolbar, disable β†’ "Disable entire cache"

  • or; see this accepted answer

+4
source

All Articles