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 288 forks source link

Is there a command to open a file? #10286

Open FerLuisxd opened 1 month ago

FerLuisxd commented 1 month ago

Is there a way to open a file from a container? I am trying to do something like this: Since there are only two options when you right-click image Wondering if a potential "copy full path" option? so you can do something like this?

code --folder-uri 'vscode://vscode-remote/docker/$container_id/usr/src/app/test_code'
bwateratmsft commented 1 month ago

As in a CLI command? I don't believe there's a way to do this with the CLI.

bwateratmsft commented 1 month ago

I think it would be a good idea to have an "Attach Visual Studio Code" command show up on folders in the container files view, though it would have to be part of the Dev Containers extension. I'll transfer this issue to their repo.