_From @cluo85 on December 21, 2015 12:44_
The IntelliSense worked fine at the beginning when I started the VS code. Sometimes after I used it for a little while, The IntelliSense would lost.
I have two ways to fix this: One is to type the command "Restart Omnisharp" and I will get IntelliSense again. Most of time this way will work, But sometimes it won't. Another way is to close vs code and reopen it. This way worked every time.
I guess the IntelliSense lost usually happened when I write comments in Chinese. But sometimes it didn't happen. I'm not sure.
I'm using C# language. Windows 10. Newest version of Unity and VS code and dotbunny unity tool.
_Copied from original issue: Microsoft/vscode#1535_
_From @VinditCo on December 22, 2015 12:45_
I think I have the same thing.
Omnisharp keeps restarting for me whilst I'm typing (every time I add a new line) - it's very annoying as the lines jump up and down as references are found. Makes VSCode pretty much unusable.
Any suggestions on how to debug this?
_From @BazIdle on December 22, 2015 13:27_
Can confirm the same issue with VSCode + C# + Unity. Omnisharp keeps restarting.
This is what I managed to get from embedded developer tools:
https://gist.github.com/BazIdle/df424cb5cd2b065a2618
("potentially unhandled rejected promise" and "Error: Canceled: Error: Canceled" are looping on every Omnisharp restart)
_From @VinditCo on December 22, 2015 13:41_
@BazIdle good find. Which Unity version are you on?
Figured a downgrade might fix it. I've tried to find previous versions of vscode for OSX with no joy. Any ideas where to find one?
(The builds on the Wiki are auto-trashed by OSX claiming they're corrupted - so I have to look elsewhere...)
_From @BazIdle on December 22, 2015 13:46_
@VinditCo 5.2.3f1
Are you, perchance, getting the same errors in Dev. Tools?
_From @VinditCo on December 22, 2015 13:51_
Looks like it ! Like 91 of Workbench causing an issue
Error: Canceled: Error: Canceled
at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/jrieken.vscode-omnisharp/out/omnisharpServer.js:235:31
at e.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:7:20571)
at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:7:21929)
at e.cancel (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:7:22756)
at e.cancel (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:7:23366)
at DiagnosticsProvider._validateDocument (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/jrieken.vscode-omnisharp/out/features/diagnosticsProvider.js:129:44)
at DiagnosticsProvider._onDocumentAddOrChange (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/jrieken.vscode-omnisharp/out/features/diagnosticsProvider.js:101:18)
at DiagnosticsProvider.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/jrieken.vscode-omnisharp/out/features/diagnosticsProvider.js:86:93)
at e.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:7:20571)
at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:7:21929)
_From @VinditCo on December 22, 2015 13:53_
After this and the disastrous Unity update I'm going to have a new rule: Don't download _any_ software updates pushed during December.
All devs are on the egg-nog...
That stack trace is unhappy but won't be the cause of this issue. Can check your omnisharp log (Cmd+L, L) and paste it here?
_From @cluo85 on December 22, 2015 14:20_
[INFO] Starting OmniSharp at 'd:\Work\AlienTown\AlienTown.sln'...
[INFO] Started OmniSharp from 'c:\Program Files (x86)\Microsoft VS Code\resources\app\extensions\jrieken.vscode-omnisharp\bin\omnisharp.cmd' with process id 15484...
[INFORMATION:OmniSharp.Startup] Omnisharp server running using stdio at location 'd:\Work\AlienTown' on host 4100.
[INFORMATION:OmniSharp.Dnx.DnxPaths] Using runtime 'C:\Users\Luochong.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8'.
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Scanning 'd:\Work\AlienTown' for DNX projects
[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] No project.json based projects found
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Detecting projects in 'd:\Work\AlienTown\AlienTown.sln'.
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Loading project from 'd:\Work\AlienTown\Assembly-CSharp.csproj'.
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Using toolset 2.0 for d:\Work\AlienTown\Assembly-CSharp.csproj
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Loading project from 'd:\Work\AlienTown\Assembly-CSharp-Editor-firstpass.csproj'.
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Using toolset 2.0 for d:\Work\AlienTown\Assembly-CSharp-Editor-firstpass.csproj
[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Detecting CSX files in 'd:\Work\AlienTown'.
[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Could not find any CSX files
[INFORMATION:OmniSharp.Startup] Solution has finished loading
[ERROR:Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware] An unhandled exception has occurred: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
System.ArgumentOutOfRangeException: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
�� Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
�� Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
�� OmniSharp.Roslyn.CSharp.Services.Intellisense.IntellisenseService.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.<HandleSingleRequest>d__18.MoveNext()
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.EndpointMiddleware.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware.
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 32ms
[ERROR:Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware] An unhandled exception has occurred: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
System.ArgumentOutOfRangeException: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
�� Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
�� Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
�� OmniSharp.Roslyn.CSharp.Services.Intellisense.IntellisenseService.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.<HandleSingleRequest>d__18.MoveNext()
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.EndpointMiddleware.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware.
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 1ms
[ERROR:Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware] An unhandled exception has occurred: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
System.ArgumentOutOfRangeException: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
�� Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
�� Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
�� OmniSharp.Roslyn.CSharp.Services.Intellisense.IntellisenseService.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.<HandleSingleRequest>d__18.MoveNext()
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.EndpointMiddleware.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware.
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 1ms
[ERROR:Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware] An unhandled exception has occurred: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
System.ArgumentOutOfRangeException: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
�� Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
�� Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
�� OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.<HandleSingleRequest>d__18.MoveNext()
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.EndpointMiddleware.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware.
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /findusages: 500 28ms
[ERROR:Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware] An unhandled exception has occurred: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
System.ArgumentOutOfRangeException: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
������: index
�� Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
�� Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
�� OmniSharp.Roslyn.CSharp.Services.Intellisense.IntellisenseService.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.<HandleSingleRequest>d__18.MoveNext()
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.Endpoint.EndpointHandler2.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� OmniSharp.Middleware.EndpointMiddleware.
--- �����쳣����һλ���ж�ջ���ٵ�ĩβ ---
�� System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
�� System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
�� Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware.
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 1ms
[ERROR:Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware] An unhandled exception has occurred: ָ���IJ����ѳ�����Чֵ�ķ�Χ��
_From @BazIdle on December 22, 2015 14:24_
@jrieken here you go: https://gist.github.com/BazIdle/c1aae81f1fc6d6e0122d
(I copied only the error)
This seems to be an issue with omnisharp. Moving there and see what we can do
By the way, my mono version is 4.2.1
I'm using whichever mono comes with unity 3.5.1f. Version 2.6.5 I think ?
Will downgrading OnmniSharp || VSCode fix this?
@VinditCo Could you try a newer version of mono? Anything above 4.0.1 should be good. Also, what OS are you using?
Sorry, just checked, i have mono-4.0.2.5 installed. Should be fine though, right? Will update anyway
4.0.2.5 should be fine.
Great, anything else you'd like me to check?
I'm running into the same issue, I think. Running VSC 0.10.5, Mono 4.2.1 from a clean install, and I get a number of "[ERROR:OmniSharp.MSBuild.MSBuildProjectSystem]" errors. Seems like the omnisharp compiler is much stricter than Unity's, but doesn't report the line numbers of the errors.
I downgraded to VSCode 0.9.3 newest version found here : https://github.com/Microsoft/vscode/wiki/Previous-Releases
And it's working again. Anyone know where I can find 0.10.3 (the previous build to 0.10.5) ?
@VinditCo Just use the "latest" download link and modify to the version you need.
E.g. https://az764295.vo.msecnd.net/public/0.10.5/VSCodeSetup.exe >> https://az764295.vo.msecnd.net/public/0.10.3/VSCodeSetup.exe
Works for OSX links as well (I did downgrade at work, where I use Mac).
Nice! Good thinking!
I'm having the same issue, I didn't find this until now but I believe this bug is identical:
https://github.com/Microsoft/vscode/issues/1935
If anyone is looking for the previous OS X release which doesn't have the issue:
https://az764295.vo.msecnd.net/public/0.10.3/VSCode-darwin.zip
Has there been any updates on this. All current versions of Visual Studio Code (from 10.3 onwards) have this bug. Is there anything else we can do to track it down?
0.10.10 is out and Intellisense seems to be working better now. (The changelog also mentions a rewrite that addresses the specific issue.)
Never mind. Seems like the new version is not compatible with the VSCode plug in (yet). (https://github.com/dotBunny/VSCode/issues/70) Also, intellisense craps out after a few minutes of usage.
@CapnCromulent I don't see any difference with the .10.10 build personally, the issue is still occurring. I believe the changelog is not referencing this issue but rather a speed up to listing the completion results, whereas this issue is with omnisharp hitting some kind of crash in the background and ceasing to work entirely until it restarts.
@VinditCo I asked a while back in the iteration plan, and got the response:
DustinCampbell commented 18 days ago
Sorry @Figbash for not commenting over at OmniSharp/omnisharp-vscode#6. We're in the middle of a bunch of work to move the extension to a new version of OmniSharp that's also in progress. Once we get over that hurdle, I'll dig deeper into your issue.
I think when they move to the new version maybe we will be in luck :)
@Figbash Thanks for the link! I'm having the same problem and this version works just fine.
Just being vocal to let devs know of the spread of the issue.
Same here, omnisharp dies after some time on large (400+ files) project. Omnisharp restart helps sometimes; VSCode restart helps always.
Extensions version 0.3.7; VSCode version 1.0.0; Unity3D 5.3.4; Windows 8.
It's still bugging out for me on any version of VSCode > 0.10.3. Unity 5.3.3, OSX... Any news on this?
Still same problem with VSCode 1.2.0 & Omnisharp 0.3.3.
:(
There's been more some discussion here : https://github.com/OmniSharp/omnisharp-vscode/issues/269#issuecomment-220969116
It seems to be something to do with large projects. Until someone is assigned to fix many of us are having to stick with 0.10.3
@VinditCo I can confirm that it has nothing to do with project size. Intellisense works for me on 1 computer and not on another (both OSX, both same project).
Problem is it just shows 'Loading...' for 10 seconds or more, then it shows Intellisense. Every single time.
Also, I notice references are not shown.
Still seems to be an issue.
I also have this issue. It works from time to time when I open a project, but shortly after Intellisense is just providing nonsense autocompletion.
I still have this issue...
Me too, on both mac and win. Especially coding some playmaker or behavedesigner scrpit, intellisense does need some 20 or 30 seconds to show up. I guess it's due to dlls.. Because other plugins we used in Unity3d are in form of C# scripts, such as NGUI. It works very well.
I have this issue too.WIN10,Unity,VSCode
having the same in win 10, unity2018.3 and VS Code
Most helpful comment
It's still bugging out for me on any version of VSCode > 0.10.3. Unity 5.3.3, OSX... Any news on this?