Open creativecreatorormaybenot opened 3 years ago
Hi @creativecreatorormaybenot Running on Windows environment (same as you), simply running the app in Android Studio, I do see the exception logs when running on the stable channel
Can make sure you're using the same plugin?
@creativecreatorormaybenot Since it is working as expected, the issue seems to be solved when upgrading, which makes it a plugin issue rather than a Flutter issue. Closing, If you disagree, please write in the comments and I will reopen it. Thank you
I updated to the latest plugin version (57.0.2
). Same behavior, errors not being displayed in Android Studio but when using flutter run
from the terminal.
(edited to keep history cleaner)
Problem
For about a week now, I have not been able to see any exceptions thrown in Dart code while running my Flutter app in Android Studio.
This problem is similar to https://github.com/flutter/flutter/issues/41133, however, I am running on Android. I have not been able to find any still open issue mentioning this issue on the latest version.
Detailed behavior
When I run any Flutter app, e.g.
Click to expand sample code
```dart void main() { runApp(const _TestWidget()); } class _TestWidget extends StatelessWidget { const _TestWidget({Key? key}) : super(key: key); @override Widget build(BuildContext context) { throw Exception('test'); return Container(); } } ```Run
feature, the exception simply does not show up in the logs.Debug
feature, the debugger stops at thethrow Exception
statement and then I can see it in the logs as well.flutter run
from theTerminal
tab within Android Studio, the exception also shows up:But no matter what I try, no exceptions are shown when the I use the normal run configuration inside of Android Studio.
Prints
This is the best part, all other
print
s and logging work perfectly fine. So when I insert aprint('foo')
, I see it in the console, but not the exceptions being thrown 🤷♀️It seems the
stderr
is not connected to Android Studio'sRun
console.Versions
Click to expand versions
``` [✓] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.19041.1052], locale en-US) • Flutter version 2.2.2 • Framework revision d79295af24 (2 days ago), 2021-06-11 08:56:01 -0700 • Engine revision 91c9fc8fe0 • Dart version 2.13.3 [!] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Platform android-S, build-tools 30.0.2 [✓] Android Studio (version 4.1.0) • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174) [✓] Connected device (4 available) • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) ```