-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Longstanding Intellisense bug #269
Comments
This bug is still in the latest release. Any updates? |
Sorry to chase @jrieken, but do you guys have any kind of ETA on this? Is there anything we can do to help diagnose the issue? Cheers |
I am also experiencing painfully slow, if non existent intellisense support on VS Code running in a Ubuntu VM. The project having issues is just a blank .NET Console application - typing "args." does nothing, and hitting ctrl+space pops open the "Loading..." and sometimes it loads. Attached is my VSCode output. |
@DustinCampbell will know |
Honestly I have given up on this being looked at, I even emailed dustin directly offering to help figure it out and got no response. There doesn't seem to be any interest in making C# functional again ever since this was split into a separate plugin :( It's very frustrating, as it worked so perfectly before that. @VinditCo My gut feeling is that it has something to do with either precompiled DLL plugins or just very large projects, as it doesn't seem to occur on any of my simpler projects. I have been trying to narrow it down so at least we could pull offending files out of the solution to allow us to work, but I have not had any luck. I will let you know if I ever find anything that helps. |
@Figbash -- don't give up hope! I actually never received your email. The OmniSharp log you provided indicated that you're using a project.json-based project. Is this a project targeting ASP .NET RC1 (e.g. DNX), or a newer .NET CLI project? |
@DustinCampbell thanks for getting back to us! I'm running Unity 5.3.4p5 - how would I check if it's using a json-based project? |
@DustinCampbell I apologize for venting, I sent the email a couple weeks ago. I am running Unity as well and believe the problem generally affects Unity projects (I'm thinking misnor has a different issue). The startup log in version .10.3 of VSCode always shows: The solution file/csproj files seem to be an XML format for visual studio 12 rather than JSON. |
Sorry, I was looking at the OmniSharp log that @misnor posted -- that one is project.json-based. I'll take a look at the project you provided. |
I'm not entirely sure if the output log is even related, I often get the same issue without the log appearing. I did get this in the output a little before the slowdown: |
Hmmm... Could you try this? Grab the latest omnisharp.linux-mono.tar.gz from https://github.com/OmniSharp/omnisharp-roslyn/releases/tag/v1.9-alpha13 and untar it to a directory. Then, set the "csharp.omnisharp" preference in VS Code to point to "/directory/you/just/created/OmniSharp.exe". Restart VS Code and see if this addresses the issue. |
I am running OSX BTW. Attempting to do what you said shows: |
:grumble: ok. Give me a day or two to get set up to try and repro. If you have anymore you could share to reproduce the problem that'd be helpful. |
Note that I've never actually installed Unity before so this is new territory for me 😊 |
Ok, thank you. I cannot share the project unfortunately as it is my companies and is enormous, perhaps @VinditCo has something shareable? If it would help figure it out I would be willing to screen share. I have gotten the alpha to start using a bash script with mono OmniSharp.exe, but it gives me: If you have any ideas on that exception I can try again. |
OK. I'm also adding @troydai, who might have some ideas as well. It seems suspicious that the DotNetProjectSystem is throwing. Do you have project.json files in your project at all? |
I can walk you through Unity: I don't see any project.json files in the project. |
I'm also on OSX and don't have any project.json files. Sadly I also cant post a copy of the project. |
I am trying to reproduce this on a smaller project but I'm not having any luck. It definitely seems to have something to do with project size or complexity... |
Good to know. I'm still looking at this. Thanks for the update! |
I also think it's something to do with the project size. Perhaps something to do with 3rd party DLL's? @Figbash are you using much from the Asset Store? |
Small-ish by itself project in unity with EmguCV's managed part in source files copied to project broke omnisharp for me. We're talking about 400 classes there. Once it's all compiled to class library, however, issue is gone. |
@Taugeshtu when you say 'compiled to class library' are you referring to the recompile VSCode triggers on code change? If so, that's the same me :) |
@VinditCo No, I'm referring to "pack all those classes into managed .dll" |
@DustinCampbell Hello! Did you have any success looking into this? |
We've been focused on getting Unity support back up and running in the C# extension (note the breaking change on our readme. Once that is working again, I'll be taking a look at the performance and flakiness of IntelliSense. Sorry for the delay! |
@Figbash, @nixbb: I just wanted to let you know that I dug into the issue and it appears that the VS Code diagnostic system doesn't scale as well as it should, especially in the scenario where there are lots of files containing at least 1 diagnostic. I've produced a repro and filed an issue for the VS Code folks to take a look at here: microsoft/vscode#11976. |
The VS Code team has dug into microsoft/vscode#11976 and has fixes that should address this problem. Hopefully, we'll see improvements soon when it comes down the VS Code Insiders channel. |
Hey all -- VS Code 1.6 is out and includes performance fixes that should fix this issue. Are folks still experiencing this issue with the latest VS Code release? |
@DustinCampbell I've been using it all week, I haven't experienced any problems. I think it's fixed. |
w00t! Note that there was also a problem with diagnostics not getting reported properly with VS Code 1.6 that has also been fixed in the latest C# extension beta. |
Excellent work, I've used 1.6.x for a week now and the slow down issues I was experiencing seems to be solved. The duplicates entries are gone as well. Thank you. |
These improvements optimizations sound really impressive... ... but I'm now getting some other problems with Intellisense when I try to use VSCode and Unity. I only have ~1 second to see and correct any errors before they disappear from the screen. Here is a gif: I'm going to try and gather some more information, try out some other Unity projects, and then I will open up another issue. In the meantime, I thought I would mention it here in case it is related to the update and others wanted to chime in. |
Ohh yes this is an issue with every unity project that has any plugins in it. the hints and suggestion take a lot of time to show up. more over changing anything in the file results in re counting of references across the file [the reference count that is shown above every method and variable] |
@heyalistair I doubt this is helpful, but I am not experiencing this at all with multiple problematic Unity projects :) |
@ChicK00o Actually hints and suggestions don't really take much time to show up at all, everything seems super fast thanks to the work that was put in on this issue. It's just that these error keep disappearing! When I switch back to VSCode 1.5.3, the errors stay on the screen like they should. It's something that I am experiencing only in 1.6.x. In 1.6.x, I only have two plugins installed C# 1.4.1 and Mono Debug 0.11.0. @Figbash Thanks! Any info is helpful, no matter how envy-inducing. :) |
@heyalistair I am seeing the exact same behavior. I'm using 1.6.1, working in a .NET Core project, any errors disappear after about a second. I don't know how to fix it, but it's been extremely frustrating. Have you found a workaround other that downgrading to 1.5? |
@perfectsquircle: This should be fixed by install 1.5-beta4 of the C# extension from here. Once you have it downloaded, installing it is pretty easy:
|
@DustinCampbell I'm trying out 1.5-beta4 now and it appears to have fixed my issue! Thanks for your quick response, this problem has been puzzling me for the last couple of weeks. I hope 1.5.0 goes live soon. |
We're working on it. 😄 |
This is still happening for me, intellisense only shows errors for a couple of seconds and then stops working. I'm using version 1.7.1 of VS Code. 2 extensions: "C#" version 1.4.1 and "Mono Debug" version 0.11.0 and Windows 7, I'm working on a new unity project but it seems to not work for any unity project regardless of if it's large or not. I'm also using Unity 5.5.0b8 which is supposed to have inbuilt VS Code support but I've also tried it on 5.4 and it makes no difference. Hopefully this can be properly fixed as it makes it completely unusable at the moment. |
Hi @CyanSlinky, could you try the new 1.5-future-preview1 release and let me know if that helps? Here are instructions to install it cleanly:
|
OK. I expect this to be greatly improved if not completely fixed in the 1.5 release. I'm going to gasp close this issue. If this continues to be an problem for anyone, let's start a new issue. |
Hi @DustinCampbell, I tried the manual install of C# extension you linked to (1.5-future-preview1) and the current release (1.5.2) via the VS Code marketplace, and neither have resolved my issue. I still have disappearing errors. I will try to recreate in a sample project and if I can do that, I will open a new issue. But anyway, thanks so much for fixing #269. It was epic. |
Thanks a ton @heyalistair. The disappearing errors issue has been a bit of a thorn in my side because I've not been able to reproduce yet. |
This was bothering me in Visual Studio Code working with Unity but I'd say check that you do not still have the "Legacy C#" extension installed. I uninstalled both and reinstalled the normal C# extension; the "mono.osx" process (it says this instead of "mono-sgen" for some reason now) still uses a lot of CPU in the ActivityMonitor but the completion problems and delays I had been seeing have gone away. |
It says "mono.osx" because OmniSharp now runs on its own Mono runtime. I'm glad to hear that the delays have gone away. That's fantastic. How much CPU activity are you seeing? |
Like, between 60% and 200%. It doesn't seem to slow anything down though, just makes the fan on my MacBook Pro spin kinda loudly. |
yeah, that seems pretty significant. Do you have a particularly large project? |
@BrianHubble Definitely didn't have the "Legacy C#" extension. Thanks tho. @DustinCampbell So... I tried to come up with a reproducible project. I started off by making sure I had fresh, recent installs of Unity and the little VSCode plugin by dotbunny and I opened an open source project. But I didn't see the bug there, and everything worked fine. Then, I switched back to my original configuration (Unity 5.4.1p4 and previous VSCode plugin) and opened my private project, where I usually see the bug. And the bug was not there. Errors do NOT disappear anymore. Maybe rewriting workspace settings helped? (In Unity -> Preferences -> VSCode tab -> Write Workspace Settings) |
@DustinCampbell Actually, this morning I installed the Visual Studio Preview for Mac that was just announced at Connect()... It looks like it might have bumped my mono version! That might have done it |
FWIW, we just discovered the caused of errors disappearing in larger projects. The necessary fix has been made to VS Code and should hopefully start showing up in VS Code Insiders builds soon. Details are here: microsoft/vscode#15585. |
@DustinCampbell It's a fairly large Unity project and the slowness will still come and go. (I should mention it also shows like 99+ errors in VS Code that are not errors in Unity). Anyway, I will try the Insiders update channel. |
From @Figbash on April 29, 2016 17:30
Will somebody please give this bug some attention? There are many of us that haven't been able to move from version 0.10.3 in December. I would very much like to run an up to date version of VSCode.
OmniSharp/omnisharp-roslyn#371
#6
Copied from original issue: microsoft/vscode#5993
The text was updated successfully, but these errors were encountered: