[英]Backbone code produces unusable stack traces
Im working with a relatively large backbone codebase, and it seems like whenever I get a javascript error, no matter what it is. 我正在使用一个相对较大的骨干代码库,似乎每当我得到一个javascript错误,无论它是什么。 The stacktrace that appears in the console looks identical (example below).
控制台中显示的堆栈跟踪看起来完全相同(下面的示例)。 All of my models/views are created via the backbone .extend method.
我的所有模型/视图都是通过骨干.extend方法创建的。 Does anyone else have this problem, or know how to fix it??
有没有其他人有这个问题,或知道如何解决它? I ususally have to put console.log statements everywhere to find the source of the error and its very time consuming.
我通常必须在任何地方放置console.log语句以找到错误的来源并且非常耗时。 Thanks.
谢谢。
jquery-1.5.min.js:16 Uncaught InvalidConstructorArgs
d.extend._Deferred.f.resolveWith jquery-1.5.min.js:16
v jquery-1.5.min.js:16
d.support.ajax.d.ajaxTransport.send.c jquery-1.5.min.js:16
You should use an un-minified version of jQuery, Underscore and Backbone when debugging. 在调试时,您应该使用未缩小版本的jQuery,Underscore和Backbone。 Life will be a lot easier if you do it that way.
如果你这样做,生活会变得容易多了。
As far as I can tell, you are having a problem with your $.ajax
call within they Backbone.sync
function, but it is way too difficult to tell when you are working with minified JS. 据我所知,你在
Backbone.sync
函数中遇到了$.ajax
调用的问题,但是当你使用缩小的JS时很难分辨。
升级到Jquery 1.6.4解决了这个问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.