Attempt to automatically de/reference symlinked files
See original GitHub issueCurrently for Node we sometimes require people to pass --preseve-symlinks
(and document this) since Node dereferences scripts it loads, which can cause file paths to not patch up.
However we could also use fs.realPath
to dereference them ourselves. Breakpoints should be applied in both places (since we won’t know which is the right one ahead of time). Still need to figure out how to deal with loaded sources, however, since when a source loads we need to tell VS code the path it knows about rather than the real path.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5 (4 by maintainers)
Top Results From Across the Web
If file in resource directory is symlink then dereference it when ...
If file in resource directory is symlink then dereference it when asked to save or export file #3764. bug It's a bug stale....
Read more >boost::exists for symlinks do not dereference - Stack Overflow
This is problematic for me, as I'm trying to get the symlink itself. For example, doing fs::exists("some_symlink") because, although ...
Read more >Creating a copy of a file, that gets automatically updated
Symlinks are pretty straight forward, but you need to understand the changes are bi-directional, a change to the content of the symlink ......
Read more >What happens to a symbolic link when the original file is ...
If the symlink target /opt/minergate-cli has been re-created when new version of application was installed, the symlink will point to new file.
Read more >How do I automatically generate symlinks? - Super User
I'm trying to figure out how to automatically generate symlinks based on file extension. My idea is to have one directory with dynamic ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@TylerLeonhardt this is expected since without
preserve-symlinks-main
, “real” is resolved toreal/a.js
, then it requiresreal/b.js
without hitting the symlink at all.So if I set a breakpoint in
linked/b.js
and line 2 oflinked/a.js
if I just have
"--preserve-symlinks-main"
I go toreal/b.js
BUTlinked/a.js
(I expect this) if I have both"--preserve-symlinks-main"
and"--preserve-symlinks"
I go tolinked/b.js
andlinked/a.js
(I expect this) if I just have"--preserve-symlinks"
I still go to thereal/b.js
andreal/a.js
(I don’t expect this - it should go tolinked/b.js
and thenreal/a.js
no?)