-
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
Debug isn't working (optimized out) #53654
Comments
//cc @derekxu16 |
Sample code: import 'package:flutter/material.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Builder(
builder: (context) {
return Center(
child: Text('Hello World!'),
);
},
),
),
);
}
} Put a breakpoint in |
I can reproduce the bug with this code. Also, I noticed generally if there is a kind of loop, breakpoints in the loop cause this bug but if you add a breakpoint before loop operation problem doesn't occur. |
The problem is that my fix did not make it into the current stable Flutter release. The information above shows that Flutter 3.13.4 uses Dart 3.1.2. Dart 3.1.2's hash is 9bf2f88, and my change to So, one solution is to use a newer release of Flutter that uses Dart 3.2.0. If this is not possible, please leave a 👍 on this comment to indicate that you would like us to cherry-pick the fix into a stable Flutter release. |
We have a planned release of the next Flutter stable release (3.16) which has the above change on November 15th, but I figure folks would like to get a fix sooner? |
Preferably yes because we need to use |
This bug really slows down debugging and sometimes this may take days. No one wants to waste time so please make it available sooner. |
A hot fix request has been filed here #53747 and can be used to track progress. |
So, I'm on latest stable flutter (3.13.8) and optimized out message is gone for me, but there is the new strange behavior for debug: When trying to view the value of variable - IDE shows the type and location of class, not the value. The value is not available in the
|
Can you please share a minimal reproducible example? I tried writing similar code to the one in your screenshot and wasn't able to reproduce the problem. |
@ozalisky any updates on the reproduction example request from @derekxu16 above. |
Sorry, was busy with work. You can close this issue and I will try to create reproducible example for it next week. Still seeing the problem almost every day 😞 |
Ok, will close this issue and wait for you to open a new one for the other issue. |
I will copy the description from the original issue Dart-Code/Dart-Code#4555 (comment)
Describe the bug
During debug, hovering a value doesn't show its value anymore.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
To show the value of the variable.
Please complete the following information:
Operating System and version: MacOS 13.5.2
VS Code version: 1.82.2
Flutter 3.13.4 • channel stable •
https://github.com/flutter/flutter.git
Framework • revision 367f9ea16b (2 weeks ago) •
2023-09-12 23:27:53 -0500
Engine • revision 9064459a8b
Tools • Dart 3.1.2 • DevTools 2.25.0
It appeared in Dart 3.0.1, Flutter 3.10.1
The text was updated successfully, but these errors were encountered: