Netcap Latency Analyser
Setting up Development Environment in Visual Studio Code
Prerequisites
- Ensure you have VSCode installed on your machine.
- Install the Remote - SSH extension in VSCode.
Step-by-Step Instructions
-
Open the terminal or command prompt on your local machine.
-
Navigate to the directory where your Vagrantfile is located.
-
Start your Vagrant virtual machine by running the following command:
vagrant up && vagrant ssh-config > ssh-config
-
Open VSCode and ensure you have the Remote - SSH extension installed.
-
Click on the Extensions icon in the sidebar (or press
Ctrl+Shift+X
), search for "Remote - SSH," and click "Install" to install the extension if it's not already installed. -
Now, open the Command Palette in VSCode by pressing
Ctrl+Shift+P
1 (Windows/Linux) orCmd+Shift+P
(Mac). -
In the Command Palette, search for "Remote-SSH: Open Configuration File..." and select it, then click "Settings" to open the VSCode SSH configuration settings
-
Locate and paste in the path for the
ssh-config
file that you generated earlier. This file contains the SSH configuration for our VMs. -
Once you select the file, click on the Remote SSH icon to the left, if you still don't see the Vagrant ssh sessions, click on the refresh button.
-
Once you see the ssh connections, select the one you want to connect to, then simply click on that ssh connection. Note that it is reccomended to open to a new window as you would need the main window for git operations
-
Once in the ssh session, you will be able to select a folder you would want to operate in, select
/home/vagrant/vagrant
. -
If you want to work with git operations, make sure you set your correct credentials as displayed on git, otherwise you would be noted as a new account. Configure your user settings by running the following commands:
git config --global user.name "NAME HERE"
git config --global user.email "EMAIL HERE"
- You can now start working with your Vagrant development environment within VSCode.
That's it! You have successfully set up your SSH development environment with the Vagrant SSH configuration in Visual Studio Code. Happy coding!