Dart-Code: VS Code does NOT print output in debug console any more on Macbook M1
Steps to Reproduce
Unfortunately, I cannot reproduce this issue on the default counter app. It happens in my app which is quite robust. Some prints work, some never. Everything worked fine until Aug 12. I took a break from coding for a week and didn’t touch my computer for a week. Aug 19 is the first day, this issue started to appear. Everything works fine in Android Studio, though.
Expected results:
Actual results:
Logs
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.2.2 20D80 darwin-arm, locale
en-US)
• Flutter version 2.2.3 at /Users/tomasbaran/code/flutter
• Framework revision f4abaa0735 (7 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/tomasbaran/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Library/Internet
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
✗ Android licenses not accepted. To resolve this, run: flutter doctor
--android-licenses
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.5.1, Build version 12E507
• CocoaPods version 1.10.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (not installed)
• Android Studio not found; download from
https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup
for detailed instructions).
[✓] VS Code (version 1.59.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.25.0
[✓] Connected device (2 available)
• iPhone 12 Pro (mobile) • 52B1B8E2-0A95-4737-B3E8-62BB977671D9 • ios
• com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
• Chrome (web) • chrome •
web-javascript • Google Chrome 92.0.4515.159
! Error: Errors were encountered while preparing your device for
development. Please check the Devices and Simulators Window. (code -1)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 28 (11 by maintainers)
I found the issue. I’m so sorry about this stupid mistake. I was filtering out a text and forgot about it that’s why it didn’t show other print outs. I’m ashamed :S
this is the second time i googled this bug and found this issue. i have to say it’s tricky since the search item would be maintained even you open new sessions every time, also considering the position is not that obvious. Thus don’t be ashamed and thanks.
well don’t be ashamed - this has helped many people including me!! 😄 Thank you!
There’s a bug in VS Code right now that stops debug console output from rendering after a restart (until you close and re-open the debug console). The issue for this is at https://github.com/microsoft/vscode/issues/192653
having the same issue right now. When I write something in the debug console I am not getting any output on occasion. Sometimes I do though which is very strange. Also, when I leave the debug console and go to the terminal tab and then directly go back to the debug console the output will be there. Nothing in the filters unfortunately.
Thanks for testing! If it seems ok with that line, then it probably wasn’t a difference in the debug adapter being used (you can remove this line now you’ve tested).
If it does come up again, please do file an issue and we can try to do some more troubleshooting and capture a log.
Thanks!
It’s still NOT working correctly. Adding my
flutter doctor -v
Logs
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-arm, locale en-US) • Flutter version 2.2.3 at /Users/tomasbaran/code/flutter • Framework revision f4abaa0735 (10 weeks ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/tomasbaran/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.5.1, Build version 12E507 • CocoaPods version 1.10.2
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3) • 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.10+0-b96-7249189)
[✓] VS Code (version 1.60.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.26.0
[✓] Connected device (2 available) • iPhone 12 Pro (mobile) • 52B1B8E2-0A95-4737-B3E8-62BB977671D9 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159
• No issues found!
Thanks for the log! This actually shows the raw DAP event being sent to VS Code:
That means this could be a VS Code issue. Could you file a bug explaining the output is missing but the debug adapter appears to be sending the correct output event (you can include the line I’ve pasted above) at https://github.com/microsoft/vscode? You can CC me so I can help out if required so it doesn’t just get closed as being the extensions fault.
Thanks!