What is Visual Studio Code?

  • VS code is a free code editor
  • We will use this tool all semester to work through assignments, projects, and applications written in Python

Why Use Visual Studio Code?

  • VS Code is fast!
    • Multi-instant, plethora of extensions, edit, navigate, debug…fast!
  • VS Code is cross-platform
    • Compatible with Windows, Mac, Linux
  • Debugger included
  • Rich intellisense and autocomplete
  • Refactoring features to tweak and improve existing code
  • Terminal included
  • Includes Agent Mode and MCP Servers

Where Can I Get Visual Studio Code?

  • https://code.visualstudio.com/download

    • Note: There is a Mac version!
    • Once VS Code is installed and running, open the Extensions Marketplace and search for “python” to install the official Microsoft Python Extension.

    VS Code Extensions Marketplace showing the Microsoft Python extension search result and install button


How to Use VS Code?

  1. Open the folder that will contain your file(s):

File, Open Folder

VS Code File menu open with "Open Folder" option highlighted

  1. Click the VS Code explorer icon to show the files in the folder (none at this point!):

VS Code Explorer sidebar icon in the activity bar used to show files in the open folder

  1. Create your Python file (Python files have a ‘.py’ extention):

File, New File

VS Code File menu with "New File" option selected to create a new Python file

  1. In the File Explorer Dialog box that appears, confirm the location and click Create File to save it:

VS Code file save dialog confirming file location with a Create File button

  1. Start entering your Python code in the file:

VS Code editor with a new Python file open and code being entered in the editor pane

  1. Enable Auto Save:

File, Auto Save, to automatically save your changes to the file

VS Code File menu showing the Auto Save option being enabled

Notice the gray circle next to the file name no longer appears, indicating that all changes to the file are saved.

VS Code tab showing a saved Python file with no unsaved-changes dot next to the filename