skip to Main Content

When I try to debug a Flutter app in Vs Code, it hits the break point fine, but when I mouse over any variable to see its value, I get "< optimized out >< error >: < Invalid params >" tooltip.
This started after I upgraded to 3.10 from 3.7.
Happens both in macos and ios debugging including simulator and actual iphone.

I tried the steps below with no help:

  1. flutter clean
  2. delete /ios(macos)/Pods
  3. delete /ios(macos)/Podfile.lock
  4. flutter pub get
  5. from inside ios(macos) folder: pod install
  6. flutter run

And I can get the values of variables with print statement, that is the only way I can kinda debug now.
I also deleted bin/cache directory of flutter sdk.

flutter doctor -v:

[✓] Flutter (Channel stable, 3.10.0, on macOS 13.3.1 22E772610a darwin-arm64, locale en-US)
    • Flutter version 3.10.0 on channel stable at /Users/aykut/Projects/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 84a1e904f4 (8 days ago), 2023-05-09 07:41:44 -0700
    • Engine revision d44b5a94c9
    • Dart version 3.0.0
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1)
    • Android SDK at /Users/aykut/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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.15+0-b2043.56-8887301)

[✓] VS Code (version 1.78.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.64.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.3.1 22E772610a darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 113.0.5672.92

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

• No issues found!

2

Answers


  1. The only thing that worked for me is downgrading:

    flutter downgrade 3.7.1
    
    Login or Signup to reply.
  2. The upgrading flutter version from 3.7 to 3.10 is causing to problem. Because in the prompt you said after upgrading, I would not be able to see variables.If you want to use latest version of flutter maybe you can update flutter extension in your VS code editor. You can do this by going to View > Extensions or simply type Ctrl+shift+x :
    extensions

    If this doesn’t work you can try other code editors like Android studio or IntelliJ IDEA. In these IDEs you have more integrated support for Flutter and might provide a better debugging experience. If none of this not work for you can simply report an issue to on the official Flutter GitHub repository. Please bear in mind when you are reporting an issue you should provide detailed information for getting help.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search