简体   繁体   中英

Persistent Local JavaScript - Chrome Debugger

I remember several years ago that I was able to save a remote JavaScript file from a website onto my local in Chrome Debugger, make a few code adjustments, and refresh the page so Chrome will be reading the local copy of the JS file. I am wondering if this feature is still available, and if so how am I able to use it?

I know that I can add breakpoints to achieve something similar. I have followed a few guides, but none of them was able to achieve what I want:

  1. https://developers.google.com/web/tools/setup/setup-workflow?hl=en
  2. https://www.sitepoint.com/edit-source-files-in-chrome/

It looks as though you can only achieve this when you are using a local server. According to the Stage persisted changes section of the API:

If you are mapping files from a remote server instead of a local server, when you refresh the page, Chrome reloads the page from the remote server. Your changes still persist to disk and are reapplied if you continue editing in Workspaces.

It seems you could achieve what you want if you use Fiddler AutoResponder :

Fiddler's AutoResponder tab allows you to return files from your local disk instead of transmitting the request to the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM