microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.66k stars 286 forks source link

Navigation with `:line:column` syntax not working for `vscode-remote` url #7787

Open EstherPerelman opened 1 year ago

EstherPerelman commented 1 year ago

This issue occurs when navigating vscode-remote url at specific row and column, see Steps to Reproduce for more information...

Steps to Reproduce:

  1. Open any MarkDown file and add there a link to navigate [test url navigation](vscode-remote://file//<path-to-file>)
  2. Open the MarkDown in preview mode - navigation suppose to work
  3. Now add row and column navigation at the end - like this: [test url navigation](vscode-remote://file//<path-to-file>:3:2)
  4. Error Notification appears: image
reynoldsalec commented 1 year ago

@EstherPerelman is the correct syntax for an external link accessed via the SSH Remote plugin something like vscode-remote://ssh-remote+remotehost/path/to/remote/directory? Been trying to nail down that syntax and haven't been able to, sounds like you might be using it...

EstherPerelman commented 1 year ago

@reynoldsalec , I'm working with WSL, this is the referrer I had for doing this: https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls

I found an issue which related to ssh urls - there are there suggestions that can help you: https://github.com/microsoft/vscode-remote-release/issues/656

chrmarti commented 1 year ago

Can you use a relative URL instead? Not all vscode-remote URIs can be easily hand-crafted.

reynoldsalec commented 1 year ago

@reynoldsalec , I'm working with WSL, this is the referrer I had for doing this: https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls

I found an issue which related to ssh urls - there are there suggestions that can help you: #656

Exactly what I was looking for @EstherPerelman, huge thanks!

EstherPerelman commented 1 year ago

Can you use a relative URL instead? Not all vscode-remote URIs can be easily hand-crafted.

@chrmarti in my case I can't use a relative url, will you fix this?