Introduction to Virtual Studio Code

VSCode IDE, debugging, project management

by Eugeniy E. Mikhailov and Greg Bentsen

Logistics and Agenda

Homework 2 due Monday Sept 14 at 11:59pm


Agenda

Virtual Studio Code (VSCode)

VSCode is an IDE = “Integrated Development Environment”

This means it contains everything you need to:

your Python projects all in a single interface.

It also natively incorporates AI tools. We will introduce these next week.

VSCode Orientation

Install Python extension (Microsoft)


Navigation

Debugging Tools

Use HW02 problem 6 as a testing ground

import numpy as np

def mymean(x):
    total = 0

    for val in x:
        total = total + val

    return total / len(x)

def mystd(x):
    total = 0

    mean = mymean(x)

    for val in x:
        total = total + (val - mean)**2

    return np.sqrt(total / (len(x)-1))

Debugging Tools

Breakpoints

Debug controls (continue, step over, step into, step out, restart, stop)

Examine variables in code by mousing over

Debug panel (left)