dotnet / vscode-csharp

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

OmniSharp Stops Responding, Running VSCode in MS Docker Derived Image #766

Closed cmiles74 closed 7 years ago

cmiles74 commented 7 years ago

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-003131)                                                                                                                                                                                                        

Product Information:                                                                                                                                                                                                                                   
 Version:            1.0.0-preview2-003131                                                                                                                                                                                                             
 Commit SHA-1 hash:  635cf40e58                                                                                                                                                                                                                        

Runtime Environment:                                                                                                                                                                                                                                   
 OS Name:     debian                                                                                                                                                                                                                                   
 OS Version:  8                                                                                                                                                                                                                                        
 OS Platform: Linux                                                                                                                                                                                                                                    
 RID:         debian.8-x64 

VS Code version: 1.5.2 C# Extension version: 1.4.1

Steps to reproduce

Run VSCode and OmniSharp under Docker with the microsoft:latest image and open a project.

Sample Docker Image Sample VSCode Project

Expected behavior

That OmniSharp would run continuously for the duration of my code editing session.

Actual behavior

OmniSharp will run for a little while (like make a couple of minutes or less) and then exit. I don't see any errors or anything interesting in the OmniSharp Log and VSCode seems to think it's still running, the icon in the lower-right says "Working". When I check running processes, however, it's definitely exited.

Log Output:

...
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /updatebuffer: 200 0ms
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /updatebuffer: 200 0ms
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /currentfilemembersastree: 200 2ms
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /updatebuffer: 200 0ms
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /currentfilemembersastree: 200 2ms
[INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /codecheck: 200 3ms

Notes

I understand that not everyone is running VSCode inside of Docker, but for me it seems like the easiest way to get all the pieces together. I run Arch Linux and here at the office I have one developer on Ubuntu and another on Fedora. My hope was to get one solid Docker image working that we could all use, and we'd all have a similar experience.

Let me know what else I could do that might be helpful, like getting more debug data, etc.

Thank you!

cmiles74 commented 7 years ago

I pulled now the newest image (by Docker image builds after the Microsoft Dotnet image) and am still seeing the same issue. I was reading through the other issues on the project and it looks like this may not be a Docker-specific issue. If you have any information on what I might be able to do to provide more detailed logs, please let me know. Whatever the issue is, it does not appear in any log file I can lay hands on. :-(

cmiles74 commented 7 years ago

This issue persists with the new build of the Docker image from Microsoft and the new release of Code with the current version of the plugin. I can open the project and OmniSharp starts up but after two or three minutes, it will exit and it's not logging any error.

I did some clean-up work on my Docker image to make it easier to test. It no longer tries to map in as many folders and, on the whole, should work for most everyone.

cmiles74 commented 7 years ago

This issue has resolved itself in the current Docker image from Microsoft and then new release of Code with the newest version of the plugin.