dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.85k stars 666 forks source link

Typing is freezed for a few seconds when intellisensing. #5123

Open Acceyuriko opened 2 years ago

Acceyuriko commented 2 years ago

Issue Description

I installed two plugins vscodevim and c#. I type some letters, trigger c# to analyzing the code, and then vscode gets stuck, and the typed letter doesn't appear in the editor until it's been analyzed for a few seconds. Disable one of the two plugins and the problem doesn't happen. The video is http://r96qpl1xa.hd-bkt.clouddn.com/desktop%202022-03-23%2014-23-28.mp4 I also raised an issue in vscodevim.

Steps to Reproduce

  1. Create a new csproj by running "dotnet new console"
  2. Open the folder by vscode with vscodevim and c# plugins.
  3. Wait for omnisharp to finish.
  4. Type any words, and the editor gets stuck.

Expected Behavior

Do not freeze typing.

Actual Behavior

Logs

OmniSharp log

Received response for /v2/getcodeactions but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: c:\Users\zec_iiii\Documents\git\vlab-unity\Assets\Common\Rotate\RotateSystem.cs, Line: 34, Column: 25. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: c:\Users\zec_iiii\Documents\git\vlab-unity\Assets\Common\Rotate\RotateSystem.cs, Line: 34, Column: 27. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: c:\Users\zec_iiii\Documents\git\vlab-unity\Assets\Common\Rotate\RotateSystem.cs, Line: 34, Column: 28. Received response for /findusages but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: c:\Users\zec_iiii\Documents\git\vlab-unity\Assets\Common\Rotate\RotateSystem.cs, Line: 34, Column: 29. Received response for /findusages but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: c:\Users\zec_iiii\Documents\git\vlab-unity\Assets\Common\Rotate\RotateSystem.cs, Line: 34, Column: 30. Received response for /findusages but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: c:\Users\zec_iiii\Documents\git\vlab-unity\Assets\Common\Rotate\RotateSystem.cs, Line: 34, Column: 31. Received response for /findusages but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: c:\Users\zec_iiii\Documents\git\vlab-unity\Assets\Common\Rotate\RotateSystem.cs, Line: 34, Column: 32. Received response for /findusages but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: c:\Users\zec_iiii\Documents\git\vlab-unity\Assets\Common\Rotate\RotateSystem.cs, Line: 34, Column: 33. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: c:\Users\zec_iiii\Documents\git\vlab-unity\Assets\Common\Rotate\RotateSystem.cs, Line: 34, Column: 32.

C# log

Post the output from Output-->C# here

Nothing.

Environment information

VSCode version: 1.65.2 C# Extension: 1.24.1

Dotnet Information .NET SDK (reflecting any global.json): Version: 6.0.101 Commit: ef49f6213a Runtime Environment: OS Name: Windows OS Version: 10.0.22000 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.101\ Host (useful for support): Version: 6.0.1 Commit: 3a25a7f1cc .NET SDKs installed: 2.1.602 [C:\Program Files\dotnet\sdk] 5.0.406 [C:\Program Files\dotnet\sdk] 6.0.101 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |background|shalldie|1.1.30| |cmake|twxs|0.0.17| |cmake-tools|ms-vscode|1.10.5| |copilot|GitHub|1.9.5350| |crates|serayuzgur|0.5.10| |csharp|ms-dotnettools|1.24.1| |errorlens|usernamehw|3.4.2| |eva-theme|fisheva|1.7.8| |even-better-toml|tamasfe|0.14.2| |git-graph|mhutchie|1.30.0| |gitlens|eamodio|12.0.5| |go|golang|0.32.0| |java|redhat|1.4.0| |javascript-ejs-support|DigitalBrainstem|1.3.1| |jupyter|ms-toolsai|2022.2.1030672458| |jupyter-keymap|ms-toolsai|1.0.0| |jupyter-renderers|ms-toolsai|1.0.6| |material-icon-theme|PKief|4.14.1| |prettier-vscode|esbenp|9.3.0| |python|ms-python|2022.2.1924087327| |remote-ssh|ms-vscode-remote|0.76.1| |remote-ssh-edit|ms-vscode-remote|0.76.1| |remote-wsl|ms-vscode-remote|0.64.2| |rust-analyzer|matklad|0.2.985| |search-node-modules|jasonnutter|1.3.0| |shader|slevesque|1.1.5| |svg|jock|1.4.17| |todo-tree|Gruntfuggly|0.0.215| |unity-debug|Unity|3.0.2| |vetur|octref|0.35.0| |vim|vscodevim|1.22.2| |vscode-data-preview|RandomFractalsInc|2.3.0| |vscode-eslint|dbaeumer|2.2.2| |vscode-hexdump|slevesque|1.8.1| |vscode-java-debug|vscjava|0.38.0| |vscode-lombok|GabrielBB|1.0.1| |vscode-mysql-client2|cweijan|4.8.6| |vscode-nginx-conf|ahmadalli|0.1.3| |vscode-power-mode|hoovercj|3.0.2| |vscode-pylance|ms-python|2022.3.2| |vscode-styled-components|jpoissonnier|1.7.0| |vscode-stylelint|stylelint|1.2.2| |vsliveshare|ms-vsliveshare|1.0.5449|;
nohwnd commented 2 years ago

Could you try installing Ionide, and trying it against C# extension, and vscodevim separately to see if it maybe happens only in one of those extensions? https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp

Acceyuriko commented 2 years ago

I tried F# with Ionide and vscodevim, and this problem did not occur. But I never studied F#, I just created a "Hello World" app by dotnet new console -lang F# -o MyApp -f net6.0. Maybe my project is too small, so the intellisense is too fast to reproduce the problem?