You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve VS Code's error when the Dart analyzer crashes #5328
Is your feature request related to a problem? Please describe.
If the Dart analyzer crashes, VS code recommends See the output for more information:
However, the output pane is not helpful:
Describe the solution you'd like
VS Code should recommend using the Dart: Capture logs VS Code command and should link to this guide: https://dartcode.org/docs/logging/
Perhaps this should also recommend cleaning the Dart analyzer cache (deleting ~/.dartServer/ on macOS)
I'll file an issue to see if we could perhaps override or contribute to this dialog though (especially as the current log output looks useless :-))
I think deleting .dartServer probably won't fix this kind of issue frequently - most commonly this is when there is an invalid assumption on the parser (often when there is some kind of invalid code that wasn't considered).
The default LSP prompt has now been replaced by one we control, which has "Show Log" that shows the stdout/stderr from the server, instead of "Show Output" which shows unhelpful information.
Activity
DanTup commentedon Oct 30, 2024
There's nothing much we can currently do in this specific case, this is all functionality of the VS Code language server client:
https://github.com/microsoft/vscode-languageserver-node/blob/ce4475fc88130e27665f49df49f162e20c328660/client/src/common/client.ts#L461
I'll file an issue to see if we could perhaps override or contribute to this dialog though (especially as the current log output looks useless :-))
I think deleting
.dartServerprobably won't fix this kind of issue frequently - most commonly this is when there is an invalid assumption on the parser (often when there is some kind of invalid code that wasn't considered).DanTup commentedon Oct 30, 2024
I've opened microsoft/vscode-languageserver-node#1578 to see if we could get some more control over this.
DanTup commentedon Nov 14, 2024
Out of interest, do you know any steps to trigger it to fail in this way? Anything I try seems to result in this message that we handle ourselves:
loic-sharma commentedon Nov 15, 2024
Unfortunately not. I haven't run into this issue again after clearing my Dart analyzer cache, sorry.
DanTup commentedon Feb 17, 2025
I was unable to make this work as required so waiting for feedback at microsoft/vscode-languageserver-node#1578 (comment)
DanTup commentedon Feb 18, 2025
The default LSP prompt has now been replaced by one we control, which has "Show Log" that shows the stdout/stderr from the server, instead of "Show Output" which shows unhelpful information.
Improve the "Dart server has crashed" message to offer a good log