question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error waiting for a debug connection: The log reader stopped unexpectedly.

See original GitHub issue

App 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

  1. Install Flutter SDK
  2. Change channel to dev
  3. flutter config --enable-linux-desktop
  4. Create a project
  5. Open project on vscode
  6. 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:closed
  • Created 3 years ago
  • Comments:26 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
DanTupcommented, Feb 1, 2021

@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).

1reaction
DanTupcommented, Feb 4, 2021

Now we just need to find a way to tell vscode to use bash instead of zsh.

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).

Read more comments on GitHub >

github_iconTop Results From Across the Web

On running default app, Flutter throws "log reader stopped ...
Error waiting for a debug connection : The log reader stopped unexpectedly ... Click on the "Futter Attach" button and the problem goes...
Read more >
Error waiting for a debug connection: The log reader ... - GitHub
my application is create by flutter create xxx, when i use flutter run -d windows in cmd but it doesn't work, and throw...
Read more >
Error waiting for a debug connection The log reader stopped ...
Hi@akhtar,. You need to execute flutter clean command in your project and also make sure the device properly connected, the cable is attached ......
Read more >
CMake->vcxproj regression in 17.1.0 when using CONFIG in ...
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started. Error launching application on Windows.
Read more >
On running default app, Flutter throws” log reader stopped ...
Earlier it was Error waiting for a debug connection: Bad state: No element , I switched to master from stable and now it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found