Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OmniSharp in VSCode very slow

I'm not sure what happened but all of a sudden OmniSharp has become very slow in VSCode.

Sometimes the autocomplete works immediately sometimes it takes minutes, same for jumping to definitions and the like.

If I disable OmniSharp autocomplete speeds up again for local variables, on occasion OmniSharp gives me a list of functions which will complete what I'm typing but doesn't autoselect the one I've half written.

Is there a way to debug this and identify the cause?

like image 471
meds Avatar asked Jan 30 '26 19:01

meds


1 Answers

If your question is about identifying the reason, try to check the "Omnisharp Logs" in the Outuput window:

enter image description here

It's normal to see some warnings and even errors in there, but there shouldn't be too many.

You can also try to increase the log level to see more info.


If you want some temporary relieves, you can also try the following settings:

    "omnisharp.analyzeOpenDocumentsOnly": true,
    // Flip this on/off and feel the difference
    "omnisharp.enableAsyncCompletion": false,
    // Flip this on/off and feel the difference
    "omnisharp.enableMsBuildLoadProjectsOnDemand": false,
    // Maybe more cost up front helps later
    "omnisharp.projectLoadTimeout": 300,
    // Only if using .NET6+, 
    // If not, read about the setting, or make sure you set it to false
    "omnisharp.useModernNet": true,
    // This slows down start normally, 
    // but see if it makes a difference after that
    "omnisharp.path": "latest",
    // Only set this to false to experiment
    // If it improves things, then some analyzer NuGet is the cause
    "omnisharp.enableRoslynAnalyzers": false,
    // Also check "omnisharp." and "csharp." settings for any
    // setting that has the word "suppress" and remove them
    // so you can see all errors and warnings from omnisharp
like image 53
Meligy Avatar answered Feb 01 '26 11:02

Meligy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!