You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter Web应用调试器报错:无法找到指定ID对象,寻求解决建议

Flutter Web调试报错:WipError -32000 Could not find object with given id

问题现象

IntelliJ调试面板持续弹出以下错误:

Debugger: Error calculating Dart variables for frame 107: WipError -32000 Could not find object with given id
Debugger: Error calculating Dart variables for frame 108: WipError -32000 Could not find object with given id
Debugger: Error calculating Dart variables for frame 109: WipError -32000 Could not find object with given id
Debugger: Error calculating Dart variables for frame 110: WipError -32000 Could not find object with given id

环境信息

执行flutter doctor结果:

[√] Flutter (Channel stable, 3.24.0, on Microsoft Windows [Version 10.0.19045.4780], locale en-GB)
    • Flutter version 3.24.0 on channel stable at d:\Ian\Documents\sdk\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 80c2e84975 (2 weeks ago), 2024-07-30 23:06:49 +0700
    • Engine revision b8800d88be
    • Dart version 3.5.0
    • DevTools version 2.37.2

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at C:\Users\Ian\AppData\Local\Android\sdk
    • Platform android-34, build-tools 32.1.0-rc1
    • Java binary at: C:\Program Files\Android\Android Studio1\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.8)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.32002.261
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)

[√] Android Studio (version 2024.1)
    • Android Studio at C:\Program Files\Android\Android Studio1
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)

[√] IntelliJ IDEA Ultimate Edition (version 2024.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.3.1
    • Flutter plugin version 81.0.2
    • Dart plugin version 241.18968.26

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.4780]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 127.0.6533.120
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 127.0.2651.86

[√] Network resources
    • All expected network resources are available.

解决建议

  • 重启调试会话与IDE:停止当前调试,关闭IntelliJ后重新启动,再开启调试。调试进程的缓存数据异常可能引发这类对象查找错误。
  • 清理项目缓存:
    执行以下命令清理Flutter依赖与构建缓存:
    flutter clean
    flutter pub get
    flutter pub upgrade
    
    手动删除项目根目录下的build/web文件夹,再重新构建Web应用。
  • 调整IDE插件版本:当前IntelliJ的Flutter插件版本81.0.2、Dart插件241.18968.26,尝试更新至最新稳定版;若更新后问题依旧,可回退到上一个兼容版本。
  • 切换调试浏览器:将调试目标从Chrome切换到Edge,不同浏览器的调试协议兼容性差异可能导致该问题。
  • 修改调试器设置:在IntelliJ的调试配置中,关闭“自动计算变量”功能,减少调试器对已销毁对象的频繁访问尝试。
  • 检查代码对象生命周期:排查项目中异步回调是否引用了已被销毁的对象,确认StatefulWidget的dispose方法是否正确清理了所有资源,避免调试器尝试访问已释放的对象实例。

内容的提问来源于stack exchange,提问作者Davout

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 16:25:07