Vscode-remote-release: Variables reference ${file} no longer works via SSH

Created on 26 Mar 2020  路  2Comments  路  Source: microsoft/vscode-remote-release

Session info:

  • VSCode Version: 1.43.2
  • Local OS Version: macOS 10.15.3
  • Remote OS Version: Ubuntu 16.04.6 LTS
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. Create the following shortcut
{
      "key": "ctrl+shift+t,
      "command": "workbench.action.terminal.sendSequence",
      "args": {
                "text": "echo ${file}"
      }
}
  1. Ensure a terminal is open
  2. Open a local file in the editor
  3. Run the command defined in 1. -> The file path is displayed in the console

  4. Now open an SSH connection (using the VScode extension)

  5. Open a remote file in the editor
  6. Run the command defined in 1. -> Returns the error below

Screen Shot 2020-03-26 at 18 43 03

I have tried different variable reference and here are the results:

  • Fails: ${file}, ${relativeFile}, ${relativeFileDirname}, ${fileBasename}, ${fileBasenameNoExtension}, ${fileDirname}, ${fileExtname}
  • Succeeds:${cwd}, ${lineNumber}, ${selectedText}, ${execPath}

Expected behavior

When using ${file} via an SSH connection, the path of the file on the remote should be returned to the console (as it used to).

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

bug variable-resolving

Most helpful comment

Based on how we're filtering, it looks like this never worked. However, it seems like something that should work.

All 2 comments

Based on how we're filtering, it looks like this never worked. However, it seems like something that should work.

I have improved variable resolving for remotes. ${file} should work with this change. However, for the relative variables a change is needed in the terminal command to allow a remote root uri here (@Tyriar )

Was this page helpful?
0 / 5 - 0 ratings