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
.exeinstaller. Accept the defaults — the installer adds VS Code to yourPATHand 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
.dmgfile and drag the VS Code icon into the Applications folder. After installing, open VS Code, then open the Command Palette (Cmd + Shift + P), typeshell command, and select Shell Command: Install ‘code’ command in PATH. This lets you open VS Code from the terminal withcode ..
Verify: After installing, open VS Code. You should see the Welcome page with a “Get Started” section.
Install the Julia Extension
- Open VS Code.
- Open the Extensions view by clicking the Extensions icon in the sidebar or pressing Ctrl + Shift + X (Cmd + Shift + X on macOS).
- Search for
juliain the search box. Install the extension named Julia (published byjulialang). - Restart VS Code once the installation is complete.
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:
- Open VS Code Settings (Ctrl + , or Cmd + , on macOS).
- Search for
julia.executablePath. - 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)
juliaup statusin a terminal and look for the 1.11.5 entry. - Windows:
- 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.
- Open the Extensions view (Ctrl/Cmd + Shift + X).
- Search for
jupyterand install the extension named Jupyter (published by Microsoft). - 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
- Open the Command Palette (Ctrl/Cmd + Shift + P) and type
Git: Clone. - Paste the repository URL (from your GitHub Classroom assignment) and press Enter.
- Choose a folder on your computer to save the repository.
- VS Code will ask if you want to open the cloned repository — click Open.
Commit and push changes
- Open the Source Control panel by clicking the branch icon in the sidebar or pressing Ctrl/Cmd + Shift + G.
- You’ll see a list of changed files under Changes.
- Hover over the Changes heading and click the + (Stage All Changes) button.
- Type a commit message in the text box at the top and click the ✓ (Commit) button.
- 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
- Open VS Code Settings and search for
julia.executablePath. - Set it as described in the Tell VS Code where Julia is installed callout above.
- 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 --versionto confirm Julia 1.11.5 is installed and on yourPATH.
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
giton yourPATH. - macOS: Run
git --versionin 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
codeto yourPATHautomatically. Open Git Bash or PowerShell and runcode .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 runcode .from any terminal.