baidu Xu
baidu Xu

Reputation: 21

Why does my WSL in vscode terminate with exit code "4294967295"

I am accustomed to using WSL in my vscode to code with cpp.

Today I configured Go in my vscode and run it successfully in powershell cmd.

However, when I transfer to WSL, it was terminated with "4294967295". I searched for a lot of resources but cannot figure out how to solve it.

This is my settings.json file and snapshot in vscode. Can somebody help me? Thanks!

enter image description here enter image description here

Upvotes: 1

Views: 7908

Answers (2)

Adrian Escutia
Adrian Escutia

Reputation: 1079

Instead of terminal.integrated.shell.windows, which is used for cmd.exe (in my case)

Use setting like this: "terminal.external.windowsExec": "wsl.exe"

Upvotes: 0

Dumbar
Dumbar

Reputation: 9

Its probably beacuse your computer can find the VM, try this:

DISM /online /disable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

Reboot, and then:

DISM /online /enable-feature /featurename:VirtualMachinePlatform /norestart
DISM /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

Upvotes: -2

Related Questions