Monday, December 2, 2013

EXTJS substring errors on loading widgets.... fast debug in Chrome

So I'm wasting a lot of time with ExtJS refactoring on typos on widgets or paths that are misspelled. See the typical errors at the end of this post... and yeah yeah
  1. 1) I should be more careful,
  2. 2) should buy a tool,
  3. 3) buy new glasses...
but honestly I would rather see a meaningful error on the Javascript so where do we put the break point (Chrome)

So in line ext-all-debug.js:5416 set a conditional breakpoint on that line for '!className'.

Uncaught TypeError: Cannot call method 'substring' of undefined ext-all-debug.js:5043
Ext.ClassManager.parseNamespace ext-all-debug.js:5043
Ext.ClassManager.get ext-all-debug.js:5151
Ext.ClassManager.instantiate ext-all-debug.js:5434
Ext.ClassManager.instantiateByAlias ext-all-debug.js:5416
Ext.apply.widget ext-all-debug.js:5701
Ext.define.create ext-all-debug.js:21751
Ext.define.lookupComponent ext-all-debug.js:37477
Ext.define.prepareItems ext-all-debug.js:37447
Ext.define.add ext-all-debug.js:37502
Ext.define.initItems ext-all-debug.js:37279
Base.implement.callParent ext-all-debug.js:4250
Ext.define.initItems ext-all-debug.js:50980
Ext.define.initComponent ext-all-debug.js:37262
Base.implement.callParent ext-all-debug.js:4250
Ext.define.initComponent ext-all-debug.js:50959
Base.implement.callParent ext-all-debug.js:4250
Ext.define.initComponent ext-all-debug.js:53582
Base.implement.callParent ext-all-debug.js:4250
Ext.define.initComponent ext-all-debug.js:126581
Ext.define.constructor ext-all-debug.js:29304
Base.implement.callParent ext-all-debug.js:4250
Ext.define.constructor ext-all-debug.js:33278
constructor ext-all-debug.js:4883
Ext.apply.widget ext-all-debug.js:5703
Ext.define.create ext-all-debug.js:21751
Ext.define.lookupComponent ext-all-debug.js:37477
Ext.define.prepareItems ext-all-debug.js:37447
Ext.define.add ext-all-debug.js:37502
Ext.define.initItems ext-all-debug.js:37279
Ext.define.initComponent ext-all-debug.js:37262
Base.implement.callParent ext-all-debug.js:4250
Ext.define.initComponent ext-all-debug.js:68865
Ext.define.constructor ext-all-debug.js:29304
Base.implement.callParent ext-all-debug.js:4250
Ext.define.constructor ext-all-debug.js:33278
constructor ext-all-debug.js:4883