VS Code Setup

Installing VS Code

Download and Install

  1. Download VS Code: Go to Visual Studio Code website
  2. Choose your platform:
  3. Windows: Download .exe installer
  4. macOS: Download .dmg file
  5. Linux: Download .deb (Ubuntu/Debian) or .rpm (Red Hat/Fedora)

Install these extensions for a complete data science setup:

Remote SSH Extension Setup

Initial Configuration

Follow the SSH and Git Setup guide to configure your SSH connection to PACE.

  1. Install Remote SSH Extension: ms-vscode-remote.remote-ssh
  2. Open Command Palette: Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS)
  3. Type: "Remote-SSH: Connect to Host"
  4. Enter Host: Use your PACE SSH configuration (e.g., pace or pace-interactive)

Remote Development Tips

Port Forwarding in VS Code

  1. Automatic Detection: VS Code detects running services and offers to forward ports
  2. Manual Forwarding:
  3. Open Command Palette (Ctrl+Shift+P)
  4. Type "Ports: Focus on Ports View"
  5. Click "Forward a Port"
  6. Enter port number (e.g., 8888 for Jupyter)

Configuring Python Environment

Python Interpreter Selection

  1. Open Command Palette: Ctrl+Shift+P
  2. Type: "Python: Select Interpreter"
  3. Choose from:
  4. System Python
  5. Virtual environments

Working with Jupyter Notebooks in VS Code

Native Jupyter Support

VS Code provides native Jupyter notebook support:

  1. Open .ipynb files directly in VS Code
  2. Create new notebooks: Ctrl+Shift+P → "Jupyter: Create New Jupyter Notebook"
  3. Select kernel: Click kernel name in top-right corner

As long as you have Jupyter installed into your Python environment, you can run notebooks seamlessly. The Python environment is ideally a virtual environment.

Jupyter Server Configuration

Connect to Remote Jupyter Server

  1. Start Jupyter on PACE:
ssh pace-interactive
jupyter lab --no-browser --ip=0.0.0.0 --port=8888
  1. Connect VS Code:
  2. Open Command Palette (Ctrl+Shift+P)
  3. Type "Jupyter: Specify Jupyter Server for Connections"
  4. Enter server URL: http://localhost:8888
  5. Enter token from Jupyter output