<style> h2 { counter-increment: h2; } h2:before { content: counter(h2) ". " } .markdown-body { font-family: -apple-system, BlinkMacSystemFont, "SFNS Display", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif !important; } </style> # How to run VS Code on your host OS and develop inside the class VM 1. Forward on your machine to port 22 of the VM: ``` VBoxManage modifyvm CS356 --natpf1 "ssh,tcp,,2222,,22" ``` Now you can log into the VM through SSH: `ssh -p 2222 trojan@` (The VM should have this mapping already.) 2. Install VS Code on your machine (macOS, Windows, Linux) 3. Install the [Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) extension of VS Code 4. `F1`, `Remote-SSH: Connect to host...`, `ssh://trojan@`, enter password `developer` (many times) ![](https://i.imgur.com/hf2wOZf.png) 5. To avoid entering the password many times, you can [configure an SSH key](https://code.visualstudio.com/docs/remote/troubleshooting#_ssh-tips) 6. Now your VS Code terminal is `trojan@cs356`: any command that you give here is running on the VM. You can clone your assignment repository with `git clone ...`, open its folder in VS Code, and run `make` inside it (or debug). ![](https://i.imgur.com/LN48iYo.png)