Open martinszeltins opened 5 months ago
I am a fan of using this feature, and I also work in vscode remote, after learning from @martinszeltins 's comment and some related issue among the projects, I wrote a simple solution call-me-back to make this work, it is kind of workaround and dirty, but I use this for my daily development now.
The main is to set up a tunnel to remote and change the editor to a script in which the remote can execute command in the right local machine
My opinion:
code
should be not found in the subprocess or the code
is not the local one which launch-editor
assumes.I hope this can help someone who is interested in this feature.
Related:
When working from home, I connect to my office computer using vscode Remote Development feature. Currently the
launch-editor
uses-r -g
arguments to open vscode but when working with remote development we need a different set of arguments. Otherwise it tries to find and open the file on the local machine (which does not exist)https://github.com/yyx990803/launch-editor/blob/master/packages/launch-editor/get-args.js#L43
When working with remote development the arguments need to be these:
The
192.168.0.17
is the name of the host found in~/.ssh/config
. I guess this part would need to be configurable or passed as query arg like/__open-in-editor?file=src/main.js&remote=NAME_OF_REMOTE
The
--remote
option wasn't well documented, it does not show up when you typecode --help
but I found it on this issue and it does indeed work - https://github.com/microsoft/vscode-remote-release/issues/5083