WSL/C# Debugging extremely slow after WSL update to 2.5.7
Does this issue occur when all extensions are disabled?: N/A
- VS Code Version: Version: 1.101.0 (user setup)
- OS Version: Windows_NT x64 10.0.22621
- WSL version: 2.5.7.0
- Kernel version: 6.6.87.1-1
Steps to Reproduce:
- Install WSL with the default Ubuntu 24.04.2 LTS distro from the Microsoft Store.
- Install the following VS Code extensions: WSL, C# Dev Kit.
- Clone or check out any midsize C# project with unit tests.
- Connect VS Code to the WSL distro and open the project folder.
- Set a breakpoint in a test and start debugging.
- When the breakpoint is hit, try stepping through the code line by line.
- Each step exhibits noticeable lag.
- Local variables take time to refresh between steps.
Performance degradation is more noticeable in larger codebases and clearly depends on the number of classes or assemblies referenced by the code under debug. In a midsize project, some debugging operations - such as Step or Set Next Statement - now take around 5-6 seconds to complete in my case.
https://github.com/user-attachments/assets/388f79d2-a652-4ae3-8554-5b406ebcc5cf
The issue appears to be caused by the recent WSL update from version 2.4.13 to 2.5.7. Currently, there is no way to roll back to the previous version. I was able to reproduce the issue on another PC by upgrading WSL only, while keeping the VS Code and plugin versions the same. Please advise on a possible fix or workaround.
Workaround: download and install WSL 2.4.13 from https://github.com/microsoft/WSL/releases, no uninstall needed.
Workaround: download and install WSL 2.4.13 from https://github.com/microsoft/WSL/releases, no uninstall needed.
Thank you so much, this has been bothering me for weeks. And this is not only when debugging tests. I have had issues on both 2.5.x and 2.6
Marking this as a duplicate of https://github.com/microsoft/WSL/issues/13215 opened on WSL.