简体   繁体   中英

Load remote source maps in chrome dev-tools

Is it possible to load a remote source maps file in chrome dev-tools?

My js file includes //# sourceMappingURL=file.js.map . but this file is actually located in a different location (for security reasons..).

Can I tell chrome dev-tools the source maps file location manually?

So the answer for this is rather simple.

  1. Go to the sources tab in chrome dev tools and find your script
  2. Click on the file to open it
  3. Do not use pretty print! the context menu on the file content changes if you pretty print it.
  4. Right click on the file content and select "Add source maps..."
  5. Enter the source maps file location (full URL with protocol)

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