Skip to content

WSL2 repos should open in VSCode Remote #9721

Open

Description

@pluma

Describe the feature or problem you’d like to solve

When working with a repository from a WSL2 path (\\wsl$\<distro name>\<path>), launching VSCode will simply open the path as if it were a regular network path. As users using VSCode with WSL will most likely be using the Remote extension, this makes the "launch VSCode" button practically useless.

Proposed solution

GitHub Desktop should recognize that a repository path is a WSL2 path and offer to launch VSCode from within WSL rather than from Windows.

Additional context

This feature request was prompted by my question at Satellite 2020: https://github.com/githubevents/satellite2020/discussions/8#discussioncomment-10795

Activity

  1. outofambit commented on May 8, 2020

    @outofambit
    Contributor

    Thanks for writing this up @pluma! Will be sure to take a look at this when we spend more time on WSL(2).

  2. added
    bug
    integrations
    windows
    on May 8, 2020
  3. just1a-person commented on Dec 17, 2020

    @just1a-person

    TL;DR

    Contents of VS Code AppData bin folder

    code.cmd gets run when you invoke code from cmd or powershell

    code is a shell script that runs when you invoke code in WSL

  4. AlexStormwood commented on Jan 15, 2023

    @AlexStormwood

    This is the first Google search result when I search for "github desktop open vscode in wsl". It would be a hugely appreciated feature to simplify my dev workflow and surely the workflow for any other WSL-based developers.

  5. beingmerry commented on Feb 3, 2023

    @beingmerry

    Bumping this. GitHub desktop would be much more useful if I didn't have to do 2 clicks (1 to open, 1 to switch to WSL extension) when launching VS Code.

    This should be a configuration change of changing the shell calling the commands. This looks possible and the intent under the Options > Integrations tab (see below) looks promising with drop-downs for External Editor and Shell, however; once changed to VS Code and WSL, VS Code still does not launch with WSL remoted in.

    image

    As an aside and to my surprise: searching WSL on GitHub docs returns nothing.

    image

  6. beingmerry commented on Feb 3, 2023

    @beingmerry

    @outofambit hi! do you still work on the terminal team? Just wondering if this issue is on the radar. I think it would just involve piping the command through the Ubuntu terminal vs Cmd.exe

  7. added
    not-planned
    on Jul 8, 2024
  8. genobear commented on Jan 7, 2025

    @genobear

    This is the first Google search result when I search for "github desktop open vscode in wsl". It would be a hugely appreciated feature to simplify my dev workflow and surely the workflow for any other WSL-based developers.

    My search was 'github desktop open in vsc wsl'

    feature would certainly be appreciated. Sad its not-planned

  9. TheRealSyler commented on Apr 4, 2025

    @TheRealSyler

    For anyone that wants a temporary solution, you can create program to launch vscode with the right arguments, then just choose Configure custom editor in the settings, configure your programm and you are good to go.

    Image

    You can use my version but beware that it creates a 100Mb executable just to save you 1 click, for me it's 100% worth it.

    Let me know if you create a version in a better suited language so that i don't have to use this huge executable for a very simple task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancementintegrationsnot-plannedwindows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions