-
Notifications
You must be signed in to change notification settings - Fork 725
Description
Description
when using vscode, i randomly lose syntax highlighting and autocompletion (aka the language server is dead),
it happens randomly when i just writing code, or when i navigate to a source (doesn't matter if it's in my project or inside a package)
sometimes reloading the window fixes the issue for few minutes before it happens again at a different place
i'm not sure why, there is no constant pattern
i changed few things in the extension settings with no luck and revert it back to defaults,
it's driving me nuts, it happens every few minutes
Environment data
dotnet --info
output:
.NET SDK:
Version: 7.0.410
Commit: 8b4848c3b2
Runtime Environment:
OS Name: Mac OS X
OS Version: 14.3
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/7.0.410/
Host:
Version: 7.0.20
Architecture: arm64
Commit: 0fb6ac59fb
.NET SDKs installed:
7.0.410 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
VS Code version:
Version: 1.92.2
Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
Date: 2024-08-14T17:29:30.058Z (3 wks ago)
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.3.0
C# Extension version (running default settings):
v2.45.17 (pre-release)
C# Dev Kit Extension version (running default settings):
v1.10.12 (pre-release)
Using OmniSharp: false
OmniSharp log
not used
Steps to reproduce
the issue happens randomly when editing any .cs file, or when i navigate to a source (doesn't matter if it's in my project or inside a package)
Expected behavior
to keep running as is
Actual behavior
lose syntax highlighting and autocompletion, just like without the c# extension
Additional context
C# extension log when the issue happens
[Error - 11:16:35 PM] [LanguageServerHost] System.ArgumentException: '<Documentacb58656-82d1-45aa-ba79-826dea1e4b8f>' is not part of the workspace.
at Microsoft.CodeAnalysis.Workspace.SetCurrentSolutionAsync[TData](Boolean useAsync, TData data, Func`3 transformation, Boolean mayRaiseEvents, Action`3 onBeforeUpdate, Action`3 onAfterUpdate, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Workspace/Workspace.cs:line 511
at Microsoft.CodeAnalysis.Workspace.OnDocumentClosedEx(DocumentId documentId, TextLoader reloader, Boolean requireDocumentPresentAndOpen) in /_/src/Workspaces/Core/Portable/Workspace/Workspace_Editor.cs:line 650
at Microsoft.CodeAnalysis.PdbSourceDocument.PdbSourceDocumentMetadataAsSourceFileProvider.TryRemoveDocumentFromWorkspace(MetadataAsSourceWorkspace workspace, String filePath) in /_/src/Features/Core/Portable/PdbSourceDocument/PdbSourceDocumentMetadataAsSourceFileProvider.cs:line 385
at Microsoft.CodeAnalysis.MetadataAsSource.MetadataAsSourceFileService.TryRemoveDocumentFromWorkspace(String filePath) in /_/src/Features/Core/Portable/MetadataAsSource/MetadataAsSourceFileService.cs:line 203
at Microsoft.CodeAnalysis.LanguageServer.LspWorkspaceManager.StopTrackingAsync(Uri uri, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.LanguageServer.Handler.DocumentChanges.DidCloseHandler.HandleNotificationAsync(DidCloseTextDocumentParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/DocumentChanges/DidCloseHandler.cs:line 36
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 199
[Error - 11:16:35 PM] [LanguageServerHost] System.ArgumentException: '<Documentacb58656-82d1-45aa-ba79-826dea1e4b8f>' is not part of the workspace.
at Microsoft.CodeAnalysis.Workspace.SetCurrentSolutionAsync[TData](Boolean useAsync, TData data, Func`3 transformation, Boolean mayRaiseEvents, Action`3 onBeforeUpdate, Action`3 onAfterUpdate, CancellationToken cancellationToken) in /_/src/Workspaces/Core/Portable/Workspace/Workspace.cs:line 511
at Microsoft.CodeAnalysis.Workspace.OnDocumentClosedEx(DocumentId documentId, TextLoader reloader, Boolean requireDocumentPresentAndOpen) in /_/src/Workspaces/Core/Portable/Workspace/Workspace_Editor.cs:line 650
at Microsoft.CodeAnalysis.PdbSourceDocument.PdbSourceDocumentMetadataAsSourceFileProvider.TryRemoveDocumentFromWorkspace(MetadataAsSourceWorkspace workspace, String filePath) in /_/src/Features/Core/Portable/PdbSourceDocument/PdbSourceDocumentMetadataAsSourceFileProvider.cs:line 385
at Microsoft.CodeAnalysis.MetadataAsSource.MetadataAsSourceFileService.TryRemoveDocumentFromWorkspace(String filePath) in /_/src/Features/Core/Portable/MetadataAsSource/MetadataAsSourceFileService.cs:line 203
at Microsoft.CodeAnalysis.LanguageServer.LspWorkspaceManager.StopTrackingAsync(Uri uri, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.LanguageServer.Handler.DocumentChanges.DidCloseHandler.HandleNotificationAsync(DidCloseTextDocumentParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/LanguageServer/Protocol/Handler/DocumentChanges/DidCloseHandler.cs:line 36
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 199
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 241
at Microsoft.CodeAnalysis.LanguageServer.RoslynRequestExecutionQueue.WrapStartRequestTaskAsync(Task nonMutatingRequestTask, Boolean rethrowExceptions) in /_/src/LanguageServer/Protocol/RoslynRequestExecutionQueue.cs:line 40
at Microsoft.CommonLanguageServerProtocol.Framework.RequestExecutionQueue`1.ProcessQueueCoreAsync[TRequest,TResponse](IQueueItem`1 work, IMethodHandler handler, RequestHandlerMetadata metadata, ConcurrentDictionary`2 concurrentlyExecutingTasks, CancellationTokenSource currentWorkCts, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/RequestExecutionQueue.cs:line 349
at Microsoft.CommonLanguageServerProtocol.Framework.RequestExecutionQueue`1.InvokeProcessCoreAsync(IQueueItem`1 work, RequestHandlerMetadata metadata, IMethodHandler handler, MethodInfo methodInfo, ConcurrentDictionary`2 concurrentlyExecutingTasks, CancellationTokenSource currentWorkCts, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/RequestExecutionQueue.cs:line 302
at Microsoft.CommonLanguageServerProtocol.Framework.RequestExecutionQueue`1.ProcessQueueAsync() in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/RequestExecutionQueue.cs:line 254
[Info - 11:16:35 PM] Error processing queue, shutting down
[Error - 11:16:35 PM] Request textDocument/diagnostic failed.
Message: Server was requested to shut down.
Code: -32000
[object Object]
[Error - 11:16:35 PM] Document pull failed for text document file:///Users/atom/Work/Rekaz/platform/aspnet-core/src/Snam.Platform.HttpApi/Controllers/Cart/CartController.cs
Message: Server was requested to shut down.
Code: -32000
[object Object]
[Error - 11:16:35 PM] Request textDocument/documentSymbol failed.
Message: Server was requested to shut down.
Code: -32000
[object Object]
[Error - 11:16:35 PM] Request textDocument/documentSymbol failed.
Message: Server was requested to shut down.
Code: -32000
[object Object]
[Info - 11:16:35 PM] Connection to server got closed. Server will restart.
true
Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime
No compatible .NET runtime found. Minimum required version is 8.0.
Dotnet path: /Users/atom/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/8.0.8~arm64/dotnet
Activating C# + C# Dev Kit...
waiting for named pipe information from server...
[stdout] {"pipeName":"/var/folders/nd/xkx43kw9057gf2p09pz9df3h0000gn/T/4be60b4d.sock"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info - 11:16:36 PM] [Program] Language server initialized
System info:
CPUs | Apple M3 Pro (11 x 2400)
-- | --
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off
Load (avg) | 4, 5, 5
Memory (System) | 18.00GB (0.04GB free)
Process Argv | --crash-reporter-id 9bef617c-6bd3-4e12-8d99-0cf3adccf85a
Screen Reader | no
VM | 0%
A/B experiment info:
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
g316j359:31013175
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
impr_priority:31102340
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-c:31111717
wkspc-ranged-t:31125599
ei213698:31121563
aajjf12562cf:31125794