I found it easiest to close any other files so there is only the one open.)īefore we can debug it, we need to configure it. (One thing to note with Visual Studio Code: Whenever you need to run or debug a file, make sure it is the current open one. At this point, you can run the program with ctrl-F5 or start debugging with F5. If you have a program to run, load it here. Note all the settings files for workspace are stored in a. If you wish to start another project, close the folder4 in the File menu, then “open folder” and select another. Visual Studio Code doesn’t work on Projects, but a workspace folder with sub-folders and files below. Next, you should create a workspace folder.
INSTALL PYTHON IN VISUAL STUDIO CODE 2017 INSTALL
I was on Ubuntu, so I did a sudo apt install python3-pip from a terminal window (and to be on the safe side, I restarted Visual Studio Code after that). If you are on Linux, make sure you have pip installed.
INSTALL PYTHON IN VISUAL STUDIO CODE 2017 HOW TO
Windows and Mac users, you’ll need an installer to get Python in working order on your machine the Python online documentation offers instructions on how to do this. The first, inevitably, is to install Python itself (if you don’t have it loaded already). Clicking the one for Python opens a pop-up menu clicking Extension Settings takes you into a rabbit-hole of 158 User settings and 148 Workspaces just for Python! Most of these you won’t ever touch, but I suggest you browse through to see what they can do ( many have to do with data science, just FYI).Ĭlicking on the Python extension again will always open on a web page in a tab for the extension. The next time you view the list of extensions, you’ll see a small cogwheel in each one.
It only takes a few seconds to install and it will require you to do a reload (click the Reload Required button). Click the bottom icon in the list on the left then, in the Search extensions in Marketplace, type “ Python.” The first result is the Microsoft authored extension just click the install button.
Having installed Visual Studio Code on your given platform, the first thing you should do is switch to the extensions tab. Let’s start off by exploring how Visual Studio Code intersects with Python development. One of Visual Studio Code’s strengths is its extensibility there are currently 17,314 extensions available, with a whopping 265 just for Python alone! Those fall into various categories and if you’re still not satisfied, you can create your own extensions. (I rate it as the best IDE on Linux, which is somewhat ironic given Microsoft’s past stormy relationship with open-source software). Four years ago, Microsoft released an open-source cross-platform IDE called Visual Studio Code that became very popular.