Search code examples
visual-studio-codevscode-remote

Is there a way to launch Visual Studio Code and force it to open in a Remote Container?


I regularly open Visual Studio Code via code . and then have to click the Re-open in Container button.

Am I missing any shortcut to force it to do this from the command line?


Solution

  • You can open devcontainer directly with devcontainer CLI.

    Install devcontainer CLI by running Remote-Containers: Install devcontainer CLI from VS Code. Then just run:

    devcontainer open
    

    in the same directory where you'd run code . and you will skip the Re-open step.