Dart-Code: Analyzing is not stopping when a syntax error occurred

So when I make a syntax error (e.g. typing a widget that doesn’t exist/not imported) analyzing is not stopping. This broke autocomplete, hover preview, and formatting. Restarting VSCode or reopening the project folder fixed this, but that’s quite annoying since syntax error is (always) gonna happen when coding.

I think this happens after I updated to version 3.0.0 earlier and also updated flutter to 1.5.4, because before I updated this didn’t happen.

VSCode version 1.33.1 Dart-Code version 3.0.0 Output of flutter doctor:

[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17763.475], locale en-US)
    • Flutter version 1.5.4-hotfix.2 at D:\Devs\Flutter\flutter
    • Framework revision 7a4c33425d (9 days ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)


[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at D:\AndroidSDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = D:\AndroidSDK
    • ANDROID_SDK_ROOT = D:\AndroidSDK
    • Java binary at: D:\AndroidStudio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at D:\AndroidStudio
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] VS Code, 64-bit edition (version 1.33.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.0.0

[√] Connected device (1 available)
    • Redmi 3S • c37ae0927d63 • android-arm64 • Android 6.0.1 (API 23)

• No issues found!

Log File Dart-Code-Log-2019-04-03 15-18-19.txt 2019-05-08_15-19-21

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 24 (13 by maintainers)

Most upvoted comments

@larssn

Understood - though even just opening an issue with a short description would help - at least we’d know there’s a potential issue. Sometimes these perf issues turn out to be trivial to diagnose. I have tried to make it as simple as possible to gather logs with the Dart: Capture Logs command (which aggregates logs from analyzer, debugger, flutter, pub, etc. into one), but I’m always open to improving this if people have ideas.

For ex. https://github.com/microsoft/vscode/issues/71165 was huge lockup in VS Code’s UI that a user reported (but I’d never experienced). It took me a while to get a log (he was also very busy and figured it’d be lots of effort), but from the log it was immediately obvious he had thousands of errors and I was able to easily reproduce. I reported it to VS Code and it was fixed the same day (and available to the user in Insiders the following day!).

So if you do get some time when you’re not so busy, please do open a new issue (it might not be the same as this one, so easier to investigate separately) and with the info you can easily get, and we’ll go from there.