freezed
freezed copied to clipboard
[WEB] unable to view freezed model values, shows <getObject: Unexpected error from chrome devtools:>
Describe the bug A clear and concise description of what the bug is. Follow freezed README instructions. I want to inspect a value from a freezed model, I get this output on vscode debugger.
Web:
Mobile:
To Reproduce
- clone this project https://github.com/vinceramcesoliveros/freezed_vscode_example
- run
flutter pub get
and run the project in debug mode - add a breakpoint anywhere inside build method.
- Inspect example variable value
Expected behavior Expected output:
id: "1"
name: "test"
Actual result:
<error>: <getObject: Unexpected error from chrome devtools:>
Flutter doctor
vinceramcesoliveros@Vinces-Air vscode_freezed_example % flutter doctor -v
[!] Flutter (Channel stable, 3.7.12, on macOS 13.0.1 22A400 darwin-arm64, locale en-PH)
• Flutter version 3.7.12 on channel stable at /Users/vinceramcesoliveros/flutter
! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.18.4/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/vinceramcesoliveros/flutter. Consider adding /Users/vinceramcesoliveros/flutter/bin to the front of your
path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4d9e56e694 (2 weeks ago), 2023-04-17 21:47:46 -0400
• Engine revision 1a65d409c7
• Dart version 2.19.6
• DevTools version 2.20.1
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/vinceramcesoliveros/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• 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.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• 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 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.78.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.62.0
[✓] Connected device (2 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 13 (API 33) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.137
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
Sounds like a devtool bug, not a Freezed one. Why would Freezed be responsible for the devtool failing to decode the object?
I'm not sure either. If I use the json_serializable I can still inspect the values from the generated model.
I thought this is a freezed issue, so I created an issue in this repo.
I'd suggest maybe an issue on the devtool instead. Nothing I can do.