Try   HackMD

How to run VS Code on your host OS and develop inside the class VM

  1. Forward 127.0.0.1:2222 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@127.0.0.1
    (The VM should have this mapping already.)

  2. Install VS Code on your machine (macOS, Windows, Linux)

  3. Install the Remote Development extension of VS Code

  4. F1, Remote-SSH: Connect to host..., ssh://trojan@127.0.0.1:2222, enter password developer (many times)

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  5. To avoid entering the password many times, you can configure an SSH key

  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).

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →