admin管理员组

文章数量:1391934

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?

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?

Share Improve this question asked Jun 8, 2016 at 7:59 Yoni DabushYoni Dabush 2204 silver badges13 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

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)

本文标签: javascriptLoad remote source maps in chrome devtoolsStack Overflow