Goal: install VS Code, select the project environment, run repository checks, use Git, and review AI-assisted changes without losing control.
Prerequisites: browser access to the project repository. Install only the extensions required by that project and your selected passport tracks.
Execution context: installation and local settings run on your laptop. A VS Code terminal runs wherever the VS Code status bar says you are connected; verify before pasting local, Blade, or Euler commands.
Table of Contents#
- Why VS Code?
- Install VS Code
- Essential Extensions
- Conda Environments in VS Code
- Running Code
- Linting & Formatting with Ruff
- Git Collaboration inside VS Code
- AI Coding Tools
- Productivity Tips
- Troubleshooting
Why VS Code?#
- Lightweight + extensible — starts fast, scales with extensions.
- Single-window workflow — editor, terminal, debugger, Git, Jupyter.
- Cross-platform — identical on Windows, macOS, Linux, and via Remote-SSH.
Install VS Code#
- Download from https://code.visualstudio.com/
- Run the installer. On Windows, keep defaults and tick “Add to PATH” / “Open with Code”.
- Launch VS Code → Help → About to confirm version.
Essential Extensions#
| Extension | Publisher | Purpose |
|---|---|---|
| Python | Microsoft | Language support, debugger, Jupyter kernels |
| Jupyter | Microsoft | Run .ipynb notebooks inside VS Code |
| Ruff | Astral Software | Python linter / formatter |
| GitHub Pull Requests and Issues | GitHub | PR review and issues |
| GitHub Copilot | GitHub | Recommended no-cost student agent route after GitHub Education verification |
| Remote Development | Microsoft | Remote-SSH for Euler / lab machines |
Install: Extensions sidebar (⌘/Ctrl + Shift + X) → search → Install.
Conda Environments in VS Code#
- Create / activate env (if needed)
conda create -n lab python=3.11 conda activate lab - Select interpreter
- Click Python version in status-bar (bottom-right), or
- Command Palette -> Python: Select Interpreter -> choose the project's
labenvironment.
Interpreter choice is stored per workspace in .vscode/settings.json.
Running Code#
Python scripts#
- Create
hello.py→print("Hello lab!") - Press Run ▶ (top-right) or F5 to debug.
- Output appears in Terminal / Debug Console.
Jupyter notebooks#
File → New File… → Jupyter Notebook(or save*.ipynb).- Top-right kernel picker → select
lab. - Add cells → Run ▷ — Markdown & rich outputs render inline.
Linting & Formatting with Ruff#
Install Ruff extension.
Use the repository's existing
pyproject.toml. For a new project, start with the IDEAL Lab template rather than inventing settings. A current minimal form is:[tool.ruff] line-length = 100 [tool.ruff.lint] select = ["E4", "E7", "E9", "F", "I"]Issues appear live in the editor & Problems panel.
Format file: Shift + Alt + F (or right-click → Format Document).
Git Collaboration inside VS Code#
Full sign-in instructions live in git_workflow.md.
Daily loop#
| Step | VS Code UI | Shortcut |
|---|---|---|
| Pull latest | ↧ icon / Git: Pull | ⌘/Ctrl + Shift + P |
| Create branch | Status-bar → branch → New | — |
| Stage → commit | Source Control sidebar | Ctrl + Enter |
| Push | ↥ icon / Git: Push | — |
| PR | Toast → Create Pull Request | — |
Example — integrate two feature branches#
- Sync
main— checkoutmain→ Pull. - New branch
integrate-wing-fuselage→ Push. - Merge
winginto integration branch → resolve conflicts → Push. - Merge
fuselage(same). - Both developers test on
integrate-wing-fuselage; repeat as needed.
AI Coding Tools#
Complete the manual FirstSteps change before delegating an edit. The canonical AI coding-agent guide explains the model, provider/gateway, harness, interface, permissions, cost, and data boundaries.
The recommended student route is GitHub Copilot Student, a personal no-cost GitHub Education benefit. It is not an ETH-purchased GitHub Copilot subscription. Zed with personal OpenRouter is an optional paid route, not a passport requirement.
VS Code can host several AI workflows:
| Tool | Best use | Repo instruction file |
|---|---|---|
| GitHub Copilot | Inline suggestions, chat, PR summaries and reviews | .github/copilot-instructions.md, AGENTS.md |
| Codex | Larger agentic edits, reviews, repo exploration | AGENTS.md |
| Claude Code | Planning, codebase exploration, careful refactors | CLAUDE.md importing AGENTS.md |
| Cursor | Agentic editing inside Cursor's VS Code-like editor | .cursor/rules/ and AGENTS.md |
Use the same operating loop for all of them:
- Ask for an explanation before edits.
- Give constraints: files to inspect, files not to touch, no new dependencies unless approved.
- Ask for tests or smoke checks before implementation.
- Review the diff yourself.
- Run verification before accepting the result.
Prefer one-time approval for an understood tool or terminal command. Do not enable broad automatic approval merely to avoid prompts.
Good prompt:
Goal: add a test for the CSV loader edge case.
Context: inspect src/data_loader.py and tests/test_data_loader.py.
Constraints: do not change public function names; do not add dependencies.
Verification: run pytest tests/test_data_loader.py.
Output: explain the failing behavior, add the test, then summarize the diff.
Never paste passwords, tokens, private keys, recovery codes, or strictly confidential data into an AI tool. Internal, confidential, personal, partner, or unpublished material requires approval for the exact tool, account mode, project, and data classification. Follow the Data And AI Policy.
Productivity Tips#
- Command Palette: ⌘/Ctrl + Shift + P — launch anything.
- Multi-cursor editing: Alt + Click (Option + Click on macOS).
- Integrated Terminal: ⌃/Ctrl + ` — inherits active Conda env.
- Remote-SSH: use the canonical Euler tunnel to work on an allocated compute node. Do not open the NAS root as a source-code workspace.
- Customize settings: File → Preferences → Settings / Keyboard Shortcuts.
Troubleshooting#
| Symptom | Fix |
|---|---|
| Conda env not listed | Activate env once in terminal → restart VS Code or run Python: Select Interpreter (Refresh). |
| Wrong notebook kernel | Top-right kernel picker → choose correct env. |
| Linting silent | Check Settings → Python › Linting: Enabled & Ruff extension status. |
| Git commands greyed | Ensure folder is a Git repo (git status works). |
| AI tool silent | Confirm sign-in, network access, extension status, and model entitlement. |
| Agent makes huge edits | Stop, revert the unwanted diff, and ask for a smaller patch with explicit files. |
For Euler connection symptoms, use
Euler troubleshooting. A first
Remote-SSH connection installing VS Code Server under ~/.vscode-server is
normal.
Verification#
- Help -> About reports a VS Code version.
- The status bar identifies the expected local or remote context.
python --versionandpython -m pip --versionidentify the project environment.- Repository lint/tests run from the integrated terminal.
- Source Control shows only intended changes.
Common Failure And Safe Recovery#
If VS Code uses the wrong machine, interpreter, or Git repository, stop running commands. Read the status bar and terminal prompt, close the remote window if necessary, reopen the intended folder, reselect the interpreter, and verify again. Do not solve context problems by reinstalling environments globally.
Ask For Help When#
The repository requires undocumented extensions/settings, Remote-SSH works in a terminal but not VS Code, or an extension requests access beyond the project.
Verified: 2026-08-26. Review by: 2026-11-26. Owner: lab software maintainer.