I need some help trying to get VSCode to start on Debian in Windows WSL.
After running nix develop
, cd into roc repo, I get the following error message when running code .
To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the code
command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N]
Running code works fine outside of nix develop as I have the WSL extension installed.
Does continue anyway? [y]
work?
No, it doesn't do anything after typing y
If I type exit
to quite the nix develop environment and type code .
, then it works, but then I'm no longer using the nix flake.
I figured it out. Nix will override environment variables if they are set ahead of time. The following command will work.
DONT_PROMPT_WSL_INSTALL=true code .
Last updated: Jul 05 2025 at 12:14 UTC