Chris
Chris

Reputation: 455

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. The stacktrace that appears in the console looks identical (example below). All of my models/views are created via the backbone .extend method. 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. 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

Upvotes: 4

Views: 323

Answers (2)

Chris
Chris

Reputation: 455

Upgrading to Jquery 1.6.4 solved this problem

Upvotes: 0

Brian Genisio
Brian Genisio

Reputation: 48147

You should use an un-minified version of jQuery, Underscore and Backbone when debugging. 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.

Upvotes: 5

Related Questions