Couldn't reconnect to WSL server are waking machine
Type: Bug
After waking my machine up - an aarch64 Surface Laptop - VSCode couldn't reconnect to WSL but WSL was responding just fine in Windows Terminal. I tried forcing a reconnection, reloading the window, and even restarting VSCode. None of that worked.
VS Code version: Code 1.100.0 (19e0f9e681ecb8e5c09d8784acaa601316ca4571, 2025-05-07T12:48:53.763Z) OS version: Windows_NT arm64 10.0.26100 Modes: Connection to 'WSL: Ubuntu-24.04' could not be established VS Code Server for WSL closed unexpectedly.
System Info
| Item | Value |
|---|---|
| CPUs | Snapdragon(R) X 12-core X1E80100 @ 3.40 GHz (12 x 2976) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled webnn: unavailable_software |
| Load (avg) | undefined |
| Memory (System) | 31.57GB (14.62GB free) |
| Process Argv | --folder-uri=vscode-remote://wsl+Ubuntu-24.04/home/heaths/src/akv-cli-rs --remote=wsl+Ubuntu-24.04 --crash-reporter-id b421e91a-a83e-464f-88a8-c37940e168d2 |
| Screen Reader | no |
| VM | 0% |
Connection to 'WSL: Ubuntu-24.04' could not be established VS Code Server for WSL closed unexpectedly.
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscod805cf:30301675
binariesv615:30325510
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
vscrp:30673768
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc1:31192215
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_c_ci:31222729
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
31787653:31262186
3e8i5726:31271747
996jf627:31283433
pythonrdcb7cf:31303019
usemplatestapi:31297334
7bj51361:31289155
747dc170:31275177
g20af354:31278749
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004
xtab2742fft-2:31302952
I keep experiencing the same problem. And, in the end, the WSL2 Ubuntu system becomes corrupted with so many errors, resulting in having to reinstall the entire Ubuntu instance over and over again. And all these errors are already getting too tiring. In the end, I'll stop using this WSL environment because it's preventing me from making progress in my development.
Is there anything in the WSL log?
Is there anything in the WSL log?
Where and how can I view those logs when I encounter an error within VSCode when opening a remote project hosted within WSL Ubuntu?
In VS Code, run the WSL: Show Log... command
In VS Code, run the
WSL: Show Log...command
I don't quite understand how to run this supposed command (WSL: Show Log) within VS Code. Especially if the connection fails when opening a remote project. Due to this connection failure, I can't even get to the VS Code terminal and run this supposed command: WSL: Show Log If I could run it, would it be like this?
When I want to open one of my remote projects within WSL, this is what I do:
- I open the Ubuntu console using Windows Terminal.
- I access the root of the project folder and run "code." to open VS Code in the project.
- In most cases, when I open VS Code, I get a message that the connection failed and that it keeps reconnecting (see images - what you see in the second image appears when I try to reconnect through the notification that appears in the middle of the editor as a kind of alert window.). I got the attached log file by opening the development tools using one of VS Code's error notifications.
Do you still have that issue?
When you are at that last screen, press F1 and select WSL: Show Log...
I haven't experienced this in quite a while, no.
Thanks, closing the issue then