Skip to content

Instantly share code, notes, and snippets.

@phoehnel
phoehnel / vsCode_in_WSL.bat
Last active December 6, 2024 08:37
"left-click" open files in WSL vsCode on Windows
:: This script solves the Problem, that opening files in vsCode from Windows will
:: always open them in a local Windows Workspace, even if your default Workspace is in WSL.
:: To get around this, this script passes the called Path to the code executable inside WSL.
:: How to Use:
:: 1. Place this Script in a persistent location on as Windows Computer (e.g. your home-dir)
:: 2. Right-Click a file in Windows, Choose "Open with" > "Other Program"
:: 3. At the very bottom choose "Select an App from your Computer" and locate this .bat file
:: --> Windows will open the file directly in WSL vsCode