-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot debug values inside some if-statements: [sentinel kind: OptimizedOut] from evaluateInFrame() #52430
Comments
//cc @derekxu16 |
I've had this report from a number of VS Code users too (there's an open issue at Dart-Code/Dart-Code#4555). I can reproduce it in some cases (using functions not Below is a Flutter app repro. It has two
Working VM request/response:
Not working VM request/response:
|
Related to this and Dart-Code/Dart-Code#4555 on Stack Overflow: Updated answer posted here |
I'm not sure why one case works but the other doesn't. Maybe @alexmarkov might know why |
@bkonyi This happens because Lines 1139 to 1142 in 8dfd804
This limitation was added in 79bcad6. Maybe we can relax that condition in case evaluated expression doesn't use |
Ah, that makes sense. Based on the number of 👍 on the issue, we should try and relax that condition if we can. Can you take a look at this @rmacnak-google? |
Hi - any update on this? I believe downgrading to 3.7.12 may fix this, but I now have a few dependencies that need SDK>=3.0.0 and so I will need to downgrade these dependencies too... |
//cc @derekxu16 could you take a look at this. |
ETA on release? This has been making debugging quite difficult |
This fix should be in Dart 3.1 Beta 3/ Flutter 3.13 (beta channel) which is slated for release on July 12th 2023 and would make it into the stable release channel on 16 August 2023 |
I wonder: how bad a bug must be to be cherry-picked. O.o |
Usually we consider regressions that cause deployed app crashes or incorrect behaviour in the deployed app for cherry picks. This bug affects debugging and developers can potentially switch to the latest beta channel for development to address the issue. Having said that if enough people think that it is critical to cherry pick this fix into the previous stable release we could consider doing a cherry pick, the earliest that cherry pick could happen would be July 19th 2023 which is later than the Dart 3.1 beta 3 release date. |
Why this issue is closed if not fixed or released ? @rmacnak-google @bkonyi |
The issue is fixed on the main branch and was released with the last beta. We don't keep issues open until they've made it into a beta / release branch because all the relevant work has been completed and leaving the issue open makes it more difficult to track what has or hasn't been completed. Since this issue has been fixed and there's no work left to be done, I'm going to lock this thread. Please file another issue if you're still encountering this problem on the beta branch. |
…iledExpression when paused inside a closure TEST=pkg/vm_service/test/evaluate_inside_closures_test.dart, pkg tryjob Fixes: #52430 Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/313001 Cherry-pick-request: #53747 Change-Id: Ib3479a0b39377ea20765752fd91fef26e8f46454 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330248 Reviewed-by: Derek Xu <derekx@google.com> Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
When I try to evaluate values within if statements in the debug console the following error appears:
Snippet that reproduces the issue (add the breakpoints in the line below the comments).
Tested on
flutter master
andflutter stable
channels, usingVSCode
(printing the value in the Debug Console) or Android Studio (evaluating expression).Master channel:
Dart SDK version: 3.1.0-118.0.dev (dev) (Tue May 16 18:58:22 2023 -0700) on "macos_x64"
Stable channel:
Dart SDK version: 3.0.1 (stable) (Tue May 16 11:57:19 2023 +0000) on "macos_x64"
This bug does not exist on
Dart SDK version: 2.19.2 (stable) (Tue Feb 7 18:37:17 2023 +0000) on "macos_x64"
The text was updated successfully, but these errors were encountered: