My source-mapped breakpoints aren't working correctly in Google Chrome

无人久伴 提交于 2019-11-29 10:57:54

问题


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.

EDIT

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


回答1:


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



来源:https://stackoverflow.com/questions/20013786/my-source-mapped-breakpoints-arent-working-correctly-in-google-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!