Open MuhsinFatih opened 5 years ago
We have no special support for ssh, but I think you could customize with code-runner.executorMap
, refer to https://github.com/formulahendry/vscode-code-runner#configuration
Install Code Runner and SSH FS
Config SSH FS like this:
{ "label": "label", // must user the root directory "root": "/", "host": "host", "port": port, "username": "name", "password": "password" } }
Add this config into your user setting
"code-runner.runInTerminal": true,
"files.eol":"\n",
"code-runner.saveFileBeforeRun":
true,`
The way I did this is that normally I had cd $dir
at the beginning of every code-runner.executorMap
command, I removed them and added code-runner.fileDirectoryAsCwd = false
. When I am not using ssh, I can enable cd
'ing into cwd by setting this to true, otherwise I use code-runner's terminal to login server over ssh and, cd into the directory myself. Thanks for the help!
Is there an ssh option where I can run my code on a remote server, or a way I can achieve this? If not, can this be implemented?
Thanks!