Install Remote Development Search for the extensions icon in vscode and install it.
Check the ssh destination settings In the directory where you start vagrant
$ vagrant ssh-config
It is displayed like this
Host "hostname"
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/{USERNAME}/vagrant/ubuntu64_18/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
$ vagrant ssh-config >> ~/.ssh/config
`> <``` displayed at the bottom left of the screen or
Remote-SSH: Connect to Host
`` in the command palette
Select the host name of the connection destination and the connection is completed.
It can be done in 5 minutes, so it's easy, so I recommend it (´_ ゝ `)Recommended Posts