Skip to content

Regular hangs of the analyzer in VSCode on Windows #60702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TheLastFlame opened this issue May 10, 2025 · 2 comments
Open

Regular hangs of the analyzer in VSCode on Windows #60702

TheLastFlame opened this issue May 10, 2025 · 2 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. P2 A bug or feature request we're likely to work on type-performance Issue relates to performance or code size

Comments

@TheLastFlame
Copy link

For the past year, in all my projects, the analyzer has been regularly hanging.

This manifests as:

  1. File saving being blocked (as it uses formatting).

    Image

  2. Broken syntax highlighting, with tooltips displaying outdated information.

    Image

  3. Failure to load object documentation on hover (it shows an endless "Loading...").

To fix this, I have to completely restart the analyzer, after which everything returns to normal for a while, but it invariably breaks again.

Several of my acquaintances are experiencing similar issues. However, after switching to macOS on the same projects, the problem disappears.

I understand that it's impossible to determine the cause with the current information, but I don't know where to find more necessary details. Perhaps there's a way to output detailed logs from the analyzer to capture what it's doing when these problems occur?

@TheLastFlame TheLastFlame added the area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. label May 10, 2025
@FMorschel
Copy link
Contributor

CC @DanTup

@DanTup
Copy link
Collaborator

DanTup commented May 12, 2025

There are some possibly related issues here:

Significantly, there was a regression in the latest SDK that could cause the analyzer to respond much more slowly - particularly when analyzer plugins (things like custom_lint) are used. I don't know if that's affected you though, as you mention this has been happening for the past year.

The three issues you mentioned are probably all the same cause (that is, the analysis server not responding, or at least being backed up). Do you know if you leave it for a long time, it eventually catches up and starts responding again?

There's a diagnostic report you can export from the analysis server that may be helpful. It would be best exported right after you've seen this issue, although if the server never becomes responsive again, then just exporting it after working for a little (but before the issue occurs) would still be useful:

  • Open the VS Code command palette (F1)
  • Run the Dart: Open Analyzer Diagnostics command
  • Click the Collect Report link to download a json report
  • Verify there's nothing sensitive in the report and attach it here

Thanks!

@bwilkerson bwilkerson added type-performance Issue relates to performance or code size P2 A bug or feature request we're likely to work on labels May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. P2 A bug or feature request we're likely to work on type-performance Issue relates to performance or code size
Projects
None yet
Development

No branches or pull requests

4 participants