Difference between revisions of "VS Code"
(→Extensions) |
(→Extensions) |
||
Line 14: | Line 14: | ||
** Remote Explorer (by Microsoft) | ** Remote Explorer (by Microsoft) | ||
− | '''Be careful'' | + | '''Be careful''' |
* When you install extensions and are doing development remotely on the CS server, some try to install large installation files on the CS server. The above do not. You can check what has been installed and how much space they are taking up with the following commands from a terminal: | * When you install extensions and are doing development remotely on the CS server, some try to install large installation files on the CS server. The above do not. You can check what has been installed and how much space they are taking up with the following commands from a terminal: | ||
<pre> | <pre> |
Revision as of 15:05, 23 March 2023
This page contains some information on proper setup of VS Code to use on your home computer and have it connect to the CS server.
Download/install
- Download and install from here - https://code.visualstudio.com/download
- On Linux, you might install using the package manager for your system (it varies by distribution).
- On Mac, the downloaded file is not an installer. You should drag the downloaded file into your Application folder and run it from there.
Extensions
To install extensions you click on one of the icons on the left hand side of the Visual Studio Code window.
Recommended extensions
- Remote SSH (by Microsoft) - allows you to connect to the CS server and run a terminal from within VS Code. Installing this will also install the following normally, which are also recommended.
- Remote SSH: Editing Configuration (by Microsoft)
- Remote Explorer (by Microsoft)
Be careful
- When you install extensions and are doing development remotely on the CS server, some try to install large installation files on the CS server. The above do not. You can check what has been installed and how much space they are taking up with the following commands from a terminal:
cd ~/.vscode-server ls -lh extensions du -d 1 -h extensions du -d 1 -h .
Connecting to CS Server
Click on the Remote Explorer icon on the left, click + to add a new connection, and put in your username@cs.indstate.edu. You may need to quit VS Code and start it again, but you should see the connection listed. You can click the arrow icon to connect with the current window or click the window button to connect in a new window.
At this point when you Open, Save, etc. files, they will be on the CS server.
You can also start a terminal within VS Code by clicking Terminal in the menu at the top and then "New Terminal".
You can have a source code file open and then run the file from within the terminal.
If you want to close the remote connection you can click on the connection icon in the lower left of the window and choose to close the remote connection. Then you would be looking at files on your personal computer again.