18

I recently switched from atom to VS Code, and there's one key feature that I can't seem to find.

Is it possible to display a symbolic link in the Visual Studio Code file explorer?

w5m
  • 2,286
  • 3
  • 34
  • 46
A.R.C
  • 181
  • 1
  • 1
  • 4
  • 4
    To future googlers, this feature has shipped. If you can't see a symlinked file, you have made the symlink incorrectly (as happened in my case) – Jon McClung Jul 09 '18 at 18:48
  • @JonMcClung It doesn't seem to work. at least for me (cygwin and vscode's terminal see the links, but Vscode explorer and pylint/python not) – maugch Apr 30 '19 at 09:53
  • Were you able to resolve the issue? – arslancharyev31 Aug 05 '19 at 09:52
  • related, but my symlinks in the remote folder don't apper: https://stackoverflow.com/questions/76725830/how-to-make-explorer-in-remote-shh-extension-in-visual-studio-code-vscode-do – Charlie Parker Jul 19 '23 at 23:45

3 Answers3

6

The February 2018 update for VSCode includes support for symbolic links.

The links appear as below:

enter image description here

For further info check this page: VSCode February 2018 update

Mwiza
  • 7,780
  • 3
  • 46
  • 42
  • 6
    It seems not to work for me. Links are correctly created/seen on the terminal and on Cygwin. VScode shows .lnk files and python can't read them. Any idea why? (vscode is the newest release) – maugch Apr 30 '19 at 09:12
  • 1
    This is still not working (December 2019): "The file is not displayed in the editor. It is either binary or uses an unsupported text encoding." – david Dec 01 '19 at 15:35
  • @maugch could you fix it? I am also facing the same issue. The linked folder is visible in the Explorer but Python code is not able to access it. Debug throws "Failed to open ..." error. – Hari Feb 19 '20 at 15:16
  • 1
    @haripkannan I had everything done on Linux and it worked, once I open the solution in Windows I see just a lnk file. I think I created the links using windows as admin and then I pulled again. – maugch Feb 20 '20 at 13:31
  • 1
    In windows open a command line as Admin, and use the following command: `mklink Link Target`. This will create a (soft) symbolic link. Example: `mklink C:\Development\cic.evaluate.antlr\JavaScript\src\Tests\ClarionExprParser.Debugger.txt C:\Development\cic.evaluate.antlr\Tests\ClarionExprParser_Debugger.txt` – Devid Jan 26 '21 at 13:46
  • related, but my symlinks in the remote folder don't apper: https://stackoverflow.com/questions/76725830/how-to-make-explorer-in-remote-shh-extension-in-visual-studio-code-vscode-do – Charlie Parker Jul 19 '23 at 23:45
2

There was an issue in GitHub to provide support for this which was resolved in February 2018 and included in the March 2018 release.

Ryan
  • 1,372
  • 14
  • 20
  • related, but my symlinks in the remote folder don't apper: https://stackoverflow.com/questions/76725830/how-to-make-explorer-in-remote-shh-extension-in-visual-studio-code-vscode-do – Charlie Parker Jul 19 '23 at 23:45
1

Not only VSCode displays symlinks, but with VSCode 1.43 (Q1 2020), it will also display dangling symlinks.

See issue 90075:

  • create symbolic links (either file or folder) and delete the target.
  • Make sure the links still show up in the file explorer with their link decoration on the right hand side.

You can delete them, or open them and type to create them.

Screenshot 2020-02-05 at 16 12 10 -- https://user-images.githubusercontent.com/900690/73854135-49af2080-4832-11ea-8c85-920280d36339.png

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250