vue.js - 如何在 Vue.js 中获取正确的详细调试消息?
问题描述
我正在尝试调试我的 VueJs3 应用程序。我经常发现控制台中显示的调试消息是神秘且不具体的。这是我最近收到的一个例子:
runtime-core.esm-bundler.js?5c40:958 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'emitsOptions')
at shouldUpdateComponent (runtime-core.esm-bundler.js?5c40:958)
at updateComponent (runtime-core.esm-bundler.js?5c40:4448)
at processComponent (runtime-core.esm-bundler.js?5c40:4402)
at patch (runtime-core.esm-bundler.js?5c40:3993)
at patchBlockChildren (runtime-core.esm-bundler.js?5c40:4307)
at patchElement (runtime-core.esm-bundler.js?5c40:4215)
at processElement (runtime-core.esm-bundler.js?5c40:4073)
at patch (runtime-core.esm-bundler.js?5c40:3990)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js?5c40:4608)
at ReactiveEffect.run (reactivity.esm-bundler.js?a1e9:160)
不幸的是,这些消息无助于缩小对象为空的特定组件或行。事实上,这些行没有引用我的任何文件。我确实安装了 Vue Chrome 扩展,但没有显示任何调试信息。我习惯于使用 python/django,其中异常会触发漂亮的堆栈跟踪级联,这有助于轻松调试错误。我如何才能更有效率地解决 Vue 中的错误?
解决方案
推荐阅读
- javascript - 如何为javascript中的按钮提供唯一ID
- windows - 具有年龄限制的批量文件复制用户配置文件
- docker - 为什么 docker compose 不挂载我的卷?
- amazon-web-services - AWS Fargate 实例无法向另一个实例发出请求
- arrays - 使用 i18n 返回翻译内容的 JSON 数组
- r - 查找两个数据帧之间最接近的时间戳,并在时间差小于 60 秒时合并不同的列
- flutter - 如何使堆叠的卡片动画以彼此落后
- c# - 如何在不知道经纬度的情况下调用 MapLocationFinder.FindLocationsAsync() 来获取地址的坐标?
- html - 如何使用 R 从网页中检索多个表
- python - 从不在 groupby 中的分组数据框中选择第二列