gpt4 book ai didi

javascript - 如何在控制台中调试 Ext JS 4 错误

转载 作者:行者123 更新时间:2023-11-30 17:53:41 24 4
gpt4 key购买 nike

错误之一是不允许应用程序完全加载。错误消息非常笼统,没有清楚说明有问题的模块:

Uncaught TypeError: Cannot read property 'data' of null
Uncaught TypeError: Cannot read property 'data' of null ext-all-debug.js:62557
Ext.define.setLabels ext-all-debug.js:62557
Ext.define.applyData ext-all-debug.js:62578
Ext.define.drawAxis ext-all-debug.js:61899
Ext.define.redraw ext-all-debug.js:60442
Ext.define.afterComponentLayout ext-all-debug.js:60382
Ext.define.notifyOwner ext-all-debug.js:37353
Ext.define.callLayout ext-all-debug.js:119598
Ext.define.flushLayouts ext-all-debug.js:119767
Ext.define.runComplete ext-all-debug.js:120253
callOverrideParent ext-all-debug.js:39
Base.implement.callParent ext-all-debug.js:4266
Ext.override.runComplete ext-all-debug.js:29267
Ext.define.run ext-all-debug.js:120234
Ext.define.statics.flushLayouts ext-all-debug.js:29275
Ext.define.statics.resumeLayouts ext-all-debug.js:29283
Ext.resumeLayouts ext-all-debug.js:31760
Ext.define.render ext-all-debug.js:28510
Ext.define.constructor ext-all-debug.js:29579
Base.implement.callParent ext-all-debug.js:4266
Ext.define.constructor ext-all-debug.js:33595
constructor ext-all-debug.js:4897
(anonymous function)
Ext.ClassManager.instantiate ext-all-debug.js:5485
(anonymous function) ext-all-debug.js:2112
Ext.apply.create ext-all-debug.js:3788
Ext.define.initViewport ext-all-debug.js:57187
Ext.define.onBeforeLaunch ext-all-debug.js:57159
Ext.define.constructor ext-all-debug.js:57099
constructor ext-all-debug.js:4897
(anonymous function) ext-all-debug.js:7794
createSingle ext-all-debug.js:9863
fire ext-all-debug.js:9818
Ext.apply.readyEvent.readyEvent.fire ext-all-debug.js:10052
Ext.apply.fireReadyEvent ext-all-debug.js:10130
Ext.apply.onDocumentReady ext-all-debug.js:10148
Ext.apply.onReady.fn ext-all-debug.js:6658
Ext.apply.triggerReady ext-all-debug.js:6644
Ext.apply.refreshQueue ext-all-debug.js:6177
Ext.apply.refreshQueue ext-all-debug.js:6207
Ext.apply.refreshQueue ext-all-debug.js:6207
Ext.apply.refreshQueue ext-all-debug.js:6207
Ext.apply.refreshQueue ext-all-debug.js:6207
Ext.apply.refreshQueue ext-all-debug.js:6207
Ext.apply.refreshQueue ext-all-debug.js:6207
Ext.apply.refreshQueue ext-all-debug.js:6207
Ext.apply.onFileLoaded ext-all-debug.js:6587
(anonymous function) ext-all-debug.js:2105
Ext.apply.injectScriptElement.onLoadFn

错误指向 ext-all-debug.js 文件。我如何找出它指向我的应用程序的哪个文件?

尝试通过inspector调试;但没有成果。

最佳答案

ext-all-debug.js 是框架中可用的所有 Ext JS 类的编译。当你调试你的应用程序时,使用 ext-dev.js 会更容易;此文件仅包含核心,所有其他类均使用 Ext.Loader 动态加载.请注意,仅切换到 ext-dev.js 并不能消除错误,但它可以让您轻松快速地查明其位置。

将浏览器调试器设置为在未处理的异常时中断也是有益的。结合动态加载,你会在错误所在的地方得到一个断点,你可以立即看到是哪个类和方法。这、堆栈跟踪和范围变量应该为您提供足够的线索来找到异常的原因。

我还建议您查看 Sencha Cmd ,它可以帮助您管理应用程序的构建过程。

关于javascript - 如何在控制台中调试 Ext JS 4 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18458312/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com