Open robbytarigan opened 1 year ago
Interesting - while I dig more into this, would you be able to update the dotnet.server.trace
setting to Trace
and attach the C# output window logs again? That might have some more clues on what is going wrong.
One area where I've seen similarish errors is if the device is running out of disk space - though unlikely is your wsl drive running out of space?
Thank you for your reply. It looks I cannot replicate the issue after a turning my machine off on Friday and turning it on back again today (Monday). I'll update the issue once I can see it again.
It's interesting you mention about disk space, so it perhaps more related with WSL issue than C# Dev Kit extension itself.
@robbytarigan My team has been experiencing this issue too.
@dibarbet I believe I can recreate this when we have two different devcontainers running each with an instance of vscode-server.
From what I can see, each container has a volume mount at /vscode which is always mapped to a volume named 'vscode' in Docker. In this volume, vscode is maintaining a cache for extensions, and a bin directory for vscode server itself. I've done some checking and I don't see how this is configurable. I even tried mapping my own uniquely named volume to /vscode in my docker-compose.yml file, which is created and mapped - but then something unmounts it and remounts the standard named 'vscode' volume.
Anyway, that in itself wasn't causing any issue historically (pre using C# DevKit), but - if devcontainer1 has a dotnet app then I launch devcontainer2, I get the following error:
I am unable to restart the language server in devcontainer2. I just get:
Update: I removed the info about it needing a dotnet app running - that was an incorrect finding.
So when launching in devcontainer, it does indeed force the mount:
[1581 ms] @devcontainers/cli 0.52.1. Node.js v18.15.0. linux 5.15.133.1-microsoft-standard-WSL2 x64.
[1581 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=\wsl.localhost\Ubuntu\home\omar\Development\mode3cloud\cdp-svc --filter label=devcontainer.config_file=/home/omar/Development/mode3cloud/cdp-svc/.devcontainer/insert/devcontainer.json
[1659 ms] Start: Run in Host: /home/omar/.vscode-server/bin/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/node /home/omar/.vscode-remote-containers/dist/dev-containers-cli-0.321.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-98beb7c0-f85c-45fa-ae70-e3d74cd37def1701365344376 --workspace-folder /home/omar/Development/mode3cloud/cdp-svc --workspace-mount-consistency cached --id-label devcontainer.local_folder=\wsl.localhost\Ubuntu\home\omar\Development\mode3cloud\cdp-svc --id-label devcontainer.config_file=/home/omar/Development/mode3cloud/cdp-svc/.devcontainer/insert/devcontainer.json --log-level debug --log-format json --config /home/omar/Development/mode3cloud/cdp-svc/.devcontainer/insert/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount
@dibarbet Even with dotnet.server.trace
I still get only this output:
Does this provide any kind of indicator where I should go looking next?
I removed the follow devcontainer defined extensions, and allowed the csdevkit to handle all the dependencies, and the issue seems to have gone away.
in my case, the source of the problems was Gitlens extension.
Type: Bug
Issue Description
C# Language server keep crashing, so intellisense and go to definition cannot work anymore.
Steps to Reproduce
Expected Behavior
Intellisense and "go to definition" should work correctly.
Actual Behavior
Intellisense and "go to definition" does not work.
Logs
C# log
C# LSP Trace Logs
Environment information
VSCode version: 1.80.1 C# Extension: 2.0.312 Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 7.0.306 Commit: f500069cb7 Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/share/dotnet/sdk/7.0.306/ Host: Version: 7.0.9 Architecture: x64 Commit: 8e9a17b221 .NET SDKs installed: 6.0.412 [/usr/share/dotnet/sdk] 7.0.302 [/usr/share/dotnet/sdk] 7.0.306 [/usr/share/dotnet/sdk] .NET runtimes installed: Microsoft.NETCore.App 6.0.16 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-preview.7.22362.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Other architectures found: None Environment variables: DOTNET_ROOT [/usr/lib/dotnet] global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/downloadVisual Studio Code Extensions
|Extension|Author|Version|Folder Name| |---|---|---|---| |aws-toolkit-vscode|amazonwebservices|1.81.0|amazonwebservices.aws-toolkit-vscode-1.81.0| |csdevkit|ms-dotnettools|0.2.100|ms-dotnettools.csdevkit-0.2.100-linux-x64| |csharp|ms-dotnettools|2.0.312|ms-dotnettools.csharp-2.0.312-linux-x64| |dotnet-interactive-vscode|ms-dotnettools|1.0.4313020|ms-dotnettools.dotnet-interactive-vscode-1.0.4313020| |dotnet-test-explorer|formulahendry|0.7.8|formulahendry.dotnet-test-explorer-0.7.8| |gitlens|eamodio|14.1.1|eamodio.gitlens-14.1.1| |intellicode-api-usage-examples|VisualStudioExptTeam|0.2.7|visualstudioexptteam.intellicode-api-usage-examples-0.2.7| |isort|ms-python|2023.10.1|ms-python.isort-2023.10.1| |jupyter|ms-toolsai|2023.6.1101941928|ms-toolsai.jupyter-2023.6.1101941928-linux-x64| |jupyter-renderers|ms-toolsai|1.0.17|ms-toolsai.jupyter-renderers-1.0.17| |live-server|ms-vscode|0.4.9|ms-vscode.live-server-0.4.9| |plantuml|jebbs|2.17.5|jebbs.plantuml-2.17.5| |powershell|ms-vscode|2023.6.0|ms-vscode.powershell-2023.6.0| |python|ms-python|2023.12.0|ms-python.python-2023.12.0| |vscode-coverage-gutters|ryanluker|2.11.0|ryanluker.vscode-coverage-gutters-2.11.0| |vscode-coverlet|urbanoanderson|1.1.5|urbanoanderson.vscode-coverlet-1.1.5| |vscode-docker|ms-azuretools|1.26.0|ms-azuretools.vscode-docker-1.26.0| |vscode-dotnet-runtime|ms-dotnettools|1.6.0|ms-dotnettools.vscode-dotnet-runtime-1.6.0| |vscode-jupyter-cell-tags|ms-toolsai|0.1.8|ms-toolsai.vscode-jupyter-cell-tags-0.1.8| |vscode-jupyter-slideshow|ms-toolsai|0.1.5|ms-toolsai.vscode-jupyter-slideshow-0.1.5| |vscode-kubernetes-tools|ms-kubernetes-tools|1.3.13|ms-kubernetes-tools.vscode-kubernetes-tools-1.3.13| |vscode-pylance|ms-python|2023.7.40|ms-python.vscode-pylance-2023.7.40| |vscode-yaml|redhat|1.14.0|redhat.vscode-yaml-1.14.0| |vscodeintellicode|VisualStudioExptTeam|1.2.30|visualstudioexptteam.vscodeintellicode-1.2.30| |vscodeintellicode-csharp|ms-dotnettools|0.1.26|ms-dotnettools.vscodeintellicode-csharp-0.1.26-linux-x64|;Extension version: 2.0.312 VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:22:07.651Z) OS version: Windows_NT x64 10.0.22621 Modes: Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2
We have written the needed data into your clipboard because it was too large to send. Please paste.