在 Chrome DevTools 中禁用源映射
Disable source maps in Chrome DevTools
有没有一种快速的方法可以从 Chrome DevTools 中显示的 jsx 代码切换到原始 ES5 并再次切换回来?
打开开发人员工具,转到 "Settings" 开发人员工具,然后取消选中 "Sources" 设置下的 Enable JavaScript Sourcemaps
。
您可以双击行号从源文件跳转到未压缩的输出文件。除此之外,它似乎是有限的。请参阅下面的评论。
我发现这在开发过程中很有用。当使用 webpack-dev-server
(或其他工具)而不压缩 js 时,您可以双击源文件中的行号以跳转到已编译但未压缩的输出文件。
我只是无意中发现了这个,然后在 2016 年 12 月 21 日发现了这条评论:
https://bugs.chromium.org/p/chromium/issues/detail?id=532174#c7
You can double click on the line number to jump into the original
file, but that's pretty useless if the minified file has all newlines
removed :(
Having word wrap would make this work better
https://bugs.chromium.org/p/chromium/issues/detail?id=167287
I think there was some support for double clicking on a section of the
minified file to jump into the source mapped file, but it seems to
have regressed of late.
Ideally in a minified file with a source map, right clicking (or
double clicking) anywhere in the minified file should allow jumping to
that exact file, line and column
有没有一种快速的方法可以从 Chrome DevTools 中显示的 jsx 代码切换到原始 ES5 并再次切换回来?
打开开发人员工具,转到 "Settings" 开发人员工具,然后取消选中 "Sources" 设置下的 Enable JavaScript Sourcemaps
。
您可以双击行号从源文件跳转到未压缩的输出文件。除此之外,它似乎是有限的。请参阅下面的评论。
我发现这在开发过程中很有用。当使用 webpack-dev-server
(或其他工具)而不压缩 js 时,您可以双击源文件中的行号以跳转到已编译但未压缩的输出文件。
我只是无意中发现了这个,然后在 2016 年 12 月 21 日发现了这条评论: https://bugs.chromium.org/p/chromium/issues/detail?id=532174#c7
You can double click on the line number to jump into the original file, but that's pretty useless if the minified file has all newlines removed :(
Having word wrap would make this work better https://bugs.chromium.org/p/chromium/issues/detail?id=167287
I think there was some support for double clicking on a section of the minified file to jump into the source mapped file, but it seems to have regressed of late.
Ideally in a minified file with a source map, right clicking (or double clicking) anywhere in the minified file should allow jumping to that exact file, line and column