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.64k stars 285 forks source link

Pipe terminal output to window #660

Open ShimShamSam opened 5 years ago

ShimShamSam commented 5 years ago

When using the integrated terminal on my local machine, I can pipe output to VSCode using something along the lines of:

echo "foo" | code -

Is there a way to do this in Remote Development- SSH?

chrmarti commented 3 years ago

@aeschli Should this already work? I see 'Reading...' in the terminal, an editor tab opens, but the editor remains empty: image

aeschli commented 3 years ago

Yes, this should work. I just tested this with Remote-SSH and with a 'Try a sample' container and it worked: The editor opens with content 'foo'. The cli command comes back when the editor is closed.

chrmarti commented 3 years ago

Nov-06-2020 14-20-28

It doesn't immediately work in a new terminal. Opening and closing another editor makes the content appear. Maybe some buffer is not flushed?

aeschli commented 3 years ago

The content is written to a temp file while the editor is opening. Maybe file changes are not tracked properly by the editor?

I don't see the bug, so @chrmarti if you can debug it on you machine that would be great.