2

Suppose I'm editing a script on a 3rd party site, because I'm trying to work around a bug, or because I want to understand their API, etc. You may also choose to suppose that I'm working on my own site, but I don't have a local copy of the script or something.

I make some changes, test them, they work, but when I refresh the page to test loading or whatever, the changes are gone, overwritten by the re-loaded script. Hitting ctrl-s gives the tantalizing but unhelpful warning "changes to this file were not saved to the file system".

My inference is that the usual use of saving files through DevTools is that it'll save it into the folder the file's being served from, so when you refresh, your server automatically gives you the updated copy. If the server isn't local, though, that doesn't help much.

Is there a way to, e.g., get Chrome to save the altered version of a script, and whenever that script is loaded, it instead substitutes the altered version? Or, is there some browser or extension which DOES allow this?

Barmar
  • 741,623
  • 53
  • 500
  • 612
Erhannis
  • 4,256
  • 4
  • 34
  • 48
  • Take a look at [local overrides](https://developers.google.com/web/updates/2018/01/devtools#overrides) – Barmar Jun 21 '19 at 20:36

0 Answers0