VS Code

Install and Set Up VS Code

You can skip this section if you already have a coding environment you like; just set it up to work with Julia1. Otherwise, VS Code is as close to an officially supported editor for Julia as you can get.

1 I assume that if this is the case, you know/can figure out how to configure your editor. If you aren’t sure, post on Ed and we can find the instructions.

Installing VS Code

Download VS Code from code.visualstudio.com.

  • Windows: Run the downloaded .exe installer. Accept the defaults — the installer adds VS Code to your PATH and offers a “Open with Code” context menu entry. If you’re installing on a managed machine (e.g., a lab computer), choose the User Installer.
  • macOS: Open the downloaded .dmg file and drag the VS Code icon into the Applications folder. After installing, open VS Code, then open the Command Palette (Cmd + Shift + P), type shell command, and select Shell Command: Install ‘code’ command in PATH. This lets you open VS Code from the terminal with code ..

Verify: After installing, open VS Code. You should see the Welcome page with a “Get Started” section.

Install the Julia Extension

  1. Open VS Code.
  2. Open the Extensions view by clicking the Extensions icon in the sidebar or pressing Ctrl + Shift + X (Cmd + Shift + X on macOS).
  3. Search for julia in the search box. Install the extension named Julia (published by julialang).
  4. Restart VS Code once the installation is complete.
WarningTell VS Code where Julia is installed

The Julia extension usually finds your Julia installation automatically. If it doesn’t, you’ll need to point it to the Julia executable managed by Juliaup:

  1. Open VS Code Settings (Ctrl + , or Cmd + , on macOS).
  2. Search for julia.executablePath.
  3. Set it to the path of your Julia 1.11.5 binary. This is usually:
    • Windows: C:\Users\YourUsername\.julia\juliaup\julia-1.11.5+0.x64\bin\julia.exe
    • macOS: /Users/YourUsername/.julia/juliaup/julia-1.11.5+0.aarch64/bin/julia (Apple Silicon) or .../x64/... (Intel)
    To find the exact path, run juliaup status in a terminal and look for the 1.11.5 entry.
  4. Restart VS Code.

Once configured, you can start a Julia REPL by opening the Command Palette (Ctrl/Cmd + Shift + P) and typing Julia: Start REPL. You can also create *.jl files and execute code line by line with Shift + Enter.

Install the Jupyter Extension

The Jupyter extension lets you open, edit, and run Jupyter notebooks (.ipynb files) directly in VS Code.

  1. Open the Extensions view (Ctrl/Cmd + Shift + X).
  2. Search for jupyter and install the extension named Jupyter (published by Microsoft).
  3. Restart VS Code.

When you open a .ipynb file, VS Code will display it as a notebook with code cells you can run. To select the Julia kernel, click the kernel picker button in the top-right corner of the notebook (it may say “Select Kernel”) and choose the Julia 1.11.5 kernel.

Using GitHub with VS Code

VS Code has built-in Git and GitHub support through the Source Control panel. You don’t need to install any extra extensions — the basics work out of the box.

Clone a repository

  1. Open the Command Palette (Ctrl/Cmd + Shift + P) and type Git: Clone.
  2. Paste the repository URL (from your GitHub Classroom assignment) and press Enter.
  3. Choose a folder on your computer to save the repository.
  4. VS Code will ask if you want to open the cloned repository — click Open.

Commit and push changes

  1. Open the Source Control panel by clicking the branch icon in the sidebar or pressing Ctrl/Cmd + Shift + G.
  2. You’ll see a list of changed files under Changes.
  3. Hover over the Changes heading and click the + (Stage All Changes) button.
  4. Type a commit message in the text box at the top and click the ✓ (Commit) button.
  5. Click the ⋯ (More Actions) menu and select Push to send your commits to GitHub.

Using the terminal instead: You can also use the built-in terminal in VS Code (Ctrl/Cmd + `) to run git commands directly — see the git setup page for the full workflow.

Pull the latest changes

Click the ⋯ (More Actions) menu in the Source Control panel and select Pull, or use the Synchronize Changes button (circular arrows) in the status bar at the bottom of the window.

Authentication: The first time you push or pull, GitHub will ask you to sign in. VS Code will open a browser window for GitHub authentication. Follow the prompts; once you authorize VS Code, you won’t need to log in again for that repository.

For a more detailed walkthrough, this YouTube video covers using GitHub within VS Code.

Troubleshooting

Julia extension can’t find Julia

  1. Open VS Code Settings and search for julia.executablePath.
  2. Set it as described in the Tell VS Code where Julia is installed callout above.
  3. Restart VS Code and try starting the REPL again.

Jupyter notebook won’t run or can’t find kernel

  • Make sure the Jupyter extension (Microsoft) is installed, not just the Julia extension.
  • Click the kernel picker (top-right of the notebook) and select the Julia 1.11.5 kernel. If it doesn’t appear, restart VS Code.
  • If the kernel still doesn’t appear, open a terminal and run julia --version to confirm Julia 1.11.5 is installed and on your PATH.

VS Code can’t find git

If the Source Control panel says “Git not found”:

  • Windows: Make sure Git for Windows is installed (see the git setup page). If it is, restart VS Code — it should detect git on your PATH.
  • macOS: Run git --version in a terminal. If it returns an error, install git (see the git setup page), then restart VS Code.

Git push asks for a password repeatedly

  • Make sure you’re using a personal access token, not your GitHub password. See the Authentication section of the git setup page.
  • If VS Code’s built-in Git authentication isn’t working, try pushing from the built-in terminal instead: open the terminal (Ctrl/Cmd + </kbd>) and rungit push` there. This will use your system’s Git Credential Manager.

How to open VS Code from the terminal

  • Windows: The installer adds code to your PATH automatically. Open Git Bash or PowerShell and run code . to open the current folder in VS Code.
  • macOS: Open the Command Palette (Cmd + Shift + P), type shell command, and select Shell Command: Install ‘code’ command in PATH. Then you can run code . from any terminal.