How do I get javascript changes to persist on refresh?

8,755 views
Skip to first unread message

Dave Netz

unread,
Mar 9, 2015, 1:12:56 PM3/9/15
to google-chrome-...@googlegroups.com
I'm trying to debug a problem on a staging server that I'm unable to edit the source code on for a bug that is not appearing on the dev server which I do have access to the code of, but when I type in console.log into the javascript file in the Sources tab and save (Ctrl+S on Windows 7) then hit F5, it reloads the page without my changes; I think I had been able before to refresh with changes in the past but I'm not sure what the exact circumstances were, and I'm not sure how to make it happen now.

I know Chrome stores the changes locally somewhere, and I just want those changes to override a file reload until I revert them or tell Chrome somehow to fully refresh the file (which I'm also not sure how to do).

Jonathan Garbee

unread,
Mar 9, 2015, 2:03:43 PM3/9/15
to google-chrome-...@googlegroups.com
The DevTools does not persist remote changes after a reload. The only way it would work is working *locally* to setup Workspaces so edits in Sources and Elements would be saved back to the files. There is no way using the DevTools to redirect a file being loaded either, you will need to use a local proxy to redirect that remote file to your local one. Charles proxy [1] is one choice that is capable of doing this.


On Mon, Mar 9, 2015 at 1:12 PM Dave Netz <daveh...@gmail.com> wrote:
I'm trying to debug a problem on a staging server that I'm unable to edit the source code on for a bug that is not appearing on the dev server which I do have access to the code of, but when I type in console.log into the javascript file in the Sources tab and save (Ctrl+S on Windows 7) then hit F5, it reloads the page without my changes; I think I had been able before to refresh with changes in the past but I'm not sure what the exact circumstances were, and I'm not sure how to make it happen now.

I know Chrome stores the changes locally somewhere, and I just want those changes to override a file reload until I revert them or tell Chrome somehow to fully refresh the file (which I'm also not sure how to do).

--
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/61651dad-00a7-431e-8c35-3b34228eb977%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages