无法在源映射文件中设置断点(使用jquery进行示例) [英] Can't set breakpoint in source mapped file (example with jquery)

查看:156
本文介绍了无法在源映射文件中设置断点(使用jquery进行示例)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这个问题可以用 jquery.com 网站。



在本网站上,导入的脚本是 jquery.min.js 其中包含一个 //#sourceMappingURL = jquery.js 指令。



这可以在chrome 37调试器上观察到:



在真正的源文件中,我试图在 500 之间设置一个断点断点出现在 6955



这个用例有什么问题?有可能这样做吗?

解决方案

当您设置断点的行没有适当的映射到编译源代码。我已经检查,确实这行被映射到jqeury.min.js文件中的一些奇怪(不寻常的)位置。



考虑将其提交为JQuery问题。但请注意,尽管在最新版本的jquery源地址url默认情况下不包括在最小化版本中,但您仍然可以从其站点下载,并检查是否已修复。


I have a problem to set a breakpoint on a javascript source file minified mapped on real sources with a source map file.

The problem can be demonstrated with jquery.com website.

On this site, the imported script is jquery.min.js which contains a //# sourceMappingURL=jquery.js directive.

This can be observed on chromium 37 debugger :

On that "real source file", i'm trying to setup a breakpoint on line 500, bug the breakpoint appears on line 6955.

What is is wrong with this use case ? Is it possible to do this ?

解决方案

This could happen when the line you set breakpoint to does not have proper mapping to the compiled source code. I have checked and indeed this line is mapped to some weird (unexisiting) position in the jqeury.min.js file.

Consider filing this as a JQuery issue. Please note, however, that while in the most recent versions of jquery source map url is not included in the minified version by default, you can still download it from their site and check if this was fixed.

这篇关于无法在源映射文件中设置断点(使用jquery进行示例)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆