Debug Python with VsCode

Visual Studio Code debugs Python. Here are the steps on Windows 10.
Create a folder with a .py file in it, e.g. Rio\proj\python\
Run code.exe, open the folder Rio\proj\python
Install extension: ms-python.python, which is the Python extension for VsCode from Microsoft.
Install pathon: python-3.7.3.exe 32bit 24M
which installs to C:\Users\rio\AppData\Local\Programs\Python\Python37-32\python.exe
Add config: click Debug then Add config, which creates S:\Rio\proj\python\.vscode\launch.json
Choose interpreter:
From Command Palette, type: Python: Select Interpreter
The installed python should be listed there, and click it.
Debug: open, set break point, hit the debug icon, they hit the green arrow in the tool bar.
execution should stop and variables can be inspected by mouse over.VsCodePy

Next Post
Comments are closed.
%d bloggers like this: