Error waiting for a debug connection: The log reader stopped unexpectedly.
See original GitHub issueApp runs from Terminal running flutter run
in release or debug mode.
App runs directly from Intellij IDE.
App does not run launching from vscode.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel dev, 1.26.0-1.0.pre, on Linux, locale pt_PT.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [✓] Android Studio [✓] IntelliJ IDEA Community Edition (version 2020.3) [✓] Connected device (2 available)
• No issues found!
vscode Version: 1.52.1 Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523 Date: 2020-12-16T16:32:10.090Z Electron: 9.3.5 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Linux x64 5.8.0-34-generic snap
vscode flutter extensions Flutter Version: 3.18.1 Dart Version: 3.18.1
Steps to Reproduce
Using Ubuntu 20.04.1 LTS
- Install Flutter SDK
- Change channel to dev
- flutter config --enable-linux-desktop
- Create a project
- Open project on vscode
- Launch the project using
Linux
as default device
Expected results: The Flutter app to show up
Actual results:
Launching lib/main.dart on Linux in debug mode...
lib/main.dart:1
Error waiting for a debug connection: The log reader stopped unexpectedly.
Error launching application on Linux.
Exited (sigterm)
DEBUG CONSOLE Launching lib/main.dart on Linux in debug mode… lib/main.dart:1 Error waiting for a debug connection: The log reader stopped unexpectedly. Error launching application on Linux. Exited (sigterm)
Issue Analytics
- State:
- Created 3 years ago
- Comments:26 (11 by maintainers)
Top GitHub Comments
@maks I would add a note on https://github.com/flutter/flutter/issues/73611 with any extra info you can provide. There’s not much going on the in the VS Code extension here (it’s just spawning Flutter) so it may be helpful to get some clarification from Flutter about exactly what “The log reader stopped unexpectedly” means on Linux (I wasn’t able to figure that out from the code).
The shell used in VS Code’s terminal shouldn’t change anything here - it’s not used for spawning the Flutter process in the VS Code debugger. We spawn the process using child_process.spawn(), and we do pass
shell: true
which according to the docs “Default: ‘/bin/sh’ on Unix, process.env.ComSpec on Windows.”.It’s probably worth making notes about anything you discover on the Flutter issue so they’re in one place/an open issue (although it sounds like the shell might not be related after all).