我的源映射断点在Google Chrome中无法正常工作 [英] My source-mapped breakpoints aren't working correctly in Google Chrome

查看:298
本文介绍了我的源映射断点在Google Chrome中无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过 Google Closure Compiler的Node.js包装器创建了一个连接的,最小化的文件。当我在谷歌浏览器中打开开发者工具时,源映射和映射文件都会正确加载。

I have created a concatenated, minified file through the Node.js wrapper for Google Closure Compiler. When I open the Developer Tools in Google Chrome, both the source map and the mapped files all load appropriately.

我遇到的一个问题是断点未触发在源地图文件中,他们将运行一个未分类的单独文件会话。有时我会尝试在脚本中放置一个断点,它会跳过几行,而不是我想要设置的位置。但最令人沮丧的是,当我设置一个断点时,它们不会触发!我将设置一个函数的中间,我知道正在被调用,但脚本从不停止执行。

A problem I'm having is that breakpoints aren't triggering in the source map files like they would running an unminified, separate-file session. Sometimes I'll try to place a breakpoint in a script and it will jump several lines down rather than where I'm trying to set it. But what is most frustrating is that when I can set a breakpoint, they aren't triggered! I'll set one in the middle of a function that I know is being called, but the script never pauses execution.

编辑

我在Ubuntu 13.10上运行Chrome 31.0.1650.57。我不能让它在Firefox 25.0中工作。

I'm running Chrome 31.0.1650.57 on Ubuntu 13.10. I can't get it to work in Firefox 25.0 either.

推荐答案

从我可以收集的内容中,由于关闭编译器组合语句和Chrome只支持整个语句作为断点。

From what I can gather, the breakpoints jump due to the closure compiler combining statements and Chrome only supporting whole statements as breakpoints.

这篇关于我的源映射断点在Google Chrome中无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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