question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support symbolic link folders in areas like debug, extensions

See original GitHub issue
  • VSCode Version: 1.16.1
  • OS Version: macOS sierra 10.12

Steps to Reproduce:

  1. Open a empty workspace
  2. Create a file and create a symlink to this file in workspace.
  3. On opening the file, the linked file will be open in the editor. The path (on hovering over the opened file name) will be shown for the symlink and opening the file in Finder by right clicking will also open the symlink’s parent folder.

The issue with this is it also causes inconsistency with Git markers in enhanced scrollbar and all extensions which operate on open file (like gitlens for git blame).

There should be a editor property to configure this path to be set as original file’s path or the symlink’s path.

Reproduces without extensions: Yes

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:47
  • Comments:24 (2 by maintainers)

github_iconTop GitHub Comments

11reactions
koliyocommented, Oct 5, 2020

Wow, this issue is causing me so much headaches due to VS code opening same file in multiple tabs with multiple paths (real path and symlinked path), and other problems as well

9reactions
ghostcommented, Nov 8, 2018

This also occurs if your project is on a different partition and you have a symlink to the parent directory of the the project folder. vscode will follow the symlink path instead of the real path.

Say you have ~/projects -> /mnt/data/projects vscode will open a file using this path ~/projects/pro1/file instead of using the absolute path.

This prevents git markings from showing and you have to manually refresh the source control to see the changed files list.

My work around is replacing the project path from “.” to the absolute path to the project in the workspace file:

"folders": [
    {
        "path": "/mnt/projects/pro1"
    }
],

but unfortunately I can’t commit this to the repo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Symbolic Links | Creative-Scripts.com
What are symbolic links? REALLY OVER SIMPLIFIED they are hyped-up shortcut files that placed in one folder (the destination) point to a file...
Read more >
Don Williamson on Twitter: "This is infuriating... Each Bazel ...
Each Bazel build makes a symlink to your cpp files in a sub-folder. ... Support symbolic link folders in areas like debug, extensions...
Read more >
"Add as Link" for folders in Visual Studio projects
For those not familiar with symbolic links, it's essentially a pointer to another file or directory. It's transparent to applications. One copy on...
Read more >
The Complete Guide to Creating Symbolic Links (aka ...
Windows 11, 10, 8, 7, and Vista all support symbolic links — also known as symlinks — that point to a file or...
Read more >
How to create a symbolic link using PowerShell?
MKLINK – Make Symbolic File and Directory links. ... I could not install Powershell community extensions even after hours of debugging. for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found