New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to open vscode:// urls in remote #4779
Comments
You'd need a |
I can figure out the When I try vscode://vscode-remote/ssh-remote+devserver/my/file/path, I think I run into microsoft/vscode#108257. However, vscode://file/my/file/path.js does route to the right vscode remote window, whose workspace root is /my/file on the remote host. By comparison vscode://file/other/file/path.js (outside the vscode remote window's workspace root) tries to open the file from the local disk in a new window. So it looks like vscode's already routing the open-file request to the right window/workspace. Current behavior is broken because vscode's confused as to whether it's trying to open remote or local, and will thus always error. |
This appears to be solved now, however the URL schema is still completely undocumented and as far as I can tell there's no way to discover it from existing open files. I eventually gave up trying to figure it out and just looked at what other people have done. It seems to be:
Note the row and column numbers are required for files, otherwise it assumes it is a directory and creates a new instance of VSCode. If you just add So yeah it basically doesn't work very well for folders but it works for files! |
This worked for me when using locatorJS |
Additional bit of info: you can get the remote to open in a new window by adding |
I would like to open links on a remote dev container (docker container) No doubt, if this is possible, it requires something magical in the URL as there is an SSH to the remote machine and then a connection to the remote container. Any help with this is much appreciated - ideally I want a link in a MD file to open another MD file in a new tab (I do not want to launch a new VSCode instance). Thanks |
Steps to Reproduce:
/my/file/path.js
Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No
This is following the vscode:// schema feature described in https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls
The text was updated successfully, but these errors were encountered: