Skip to content
Python extension for Visual Studio Code
TypeScript Python JavaScript HTML Jupyter Notebook CSS
Branch: master
Clone or download
This branch is 6 commits ahead of DonJayamanne:master.

Latest commit

DonJayamanne Cancelling should invoke a single interrupt (#12106)
For #10496

Runing entire notebook and clicking cancel would result in kernel being interrupted n times (where n = number of cells).
I.e. user clicks cancel once, but we end up interrupting multiple times.
Latest commit ac79a17 Jun 2, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.devcontainer Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
.github Revert LS issue template changes (#12016) May 27, 2020
.vscode Update NotebookModel with changes from VS Code Notebook UI (#12048) Jun 1, 2020
build Start page (#11605) May 30, 2020
data Remove unused file (#11766) May 12, 2020
images Start page (#11605) May 30, 2020
languages Introduce pip requirements file highlighting Sep 27, 2017
news First steps in supporting other kernels/languages (#12096) Jun 2, 2020
pythonFiles Start page (#11605) May 30, 2020
resources Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
schemas Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
snippets Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
src Cancelling should invoke a single interrupt (#12106) Jun 2, 2020
syntaxes Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
types Update NotebookModel with changes from VS Code Notebook UI (#12048) Jun 1, 2020
typings Update NotebookModel with changes from VS Code Notebook UI (#12048) Jun 1, 2020
.editorconfig #1228 multi root master (#2) Nov 1, 2017
.eslintrc Format ts code using Prettier (#9359) Jan 2, 2020
.gitattributes Update to Jedi 0.17 (#11252) Apr 21, 2020
.gitignore Allow LS to be bundled, versioned (#12034) Jun 1, 2020
.npmrc Make gather an optional component (#9755) Mar 8, 2020
.nvmrc Update node to 12.4.0 (#9424) Jan 8, 2020
.prettierrc.js Support Update Display Data (#10874) Mar 31, 2020
.sonarcloud.properties Run by line partial implementation (#11608) May 6, 2020
.vscodeignore Allow LS to be bundled, versioned (#12034) Jun 1, 2020
CHANGELOG.md Merge from release back to master (#11895) May 19, 2020
CODE_OF_CONDUCT.md Legal stuff to make CELA happy (#5) Nov 2, 2017
CODING_STANDARDS.md Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
CONTRIBUTING.md Fix the instructions for how to run a specific system test suite (#11692 May 26, 2020
LICENSE Legal stuff to make CELA happy (#5) Nov 2, 2017
PYTHON_INTERACTIVE_TROUBLESHOOTING.md Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
README.md Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
SECURITY.md Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
ThirdPartyNotices-Distribution.txt Preparing RC : updated version, TPN and change logs (#11599) May 5, 2020
ThirdPartyNotices-Repository.txt merged with current master Apr 14, 2020
experiments.json Scale down number of users seeing survey prompt (#12001) May 28, 2020
gulpfile.js Support Notebook Renderers with VS Code Notebooks (disabled) (#11999) May 28, 2020
icon.png moved icon Jul 2, 2017
package-lock.json Add support for VS Code's experiment service (#11979) Jun 2, 2020
package.datascience-ui.dependencies.json Made Variable Explorer Resizable (#11959) May 27, 2020
package.json Add support for VS Code's experiment service (#11979) Jun 2, 2020
package.nls.de.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.es.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.fr.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.it.json Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
package.nls.ja.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.json Start page (#11605) May 30, 2020
package.nls.ko-kr.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.nl.json Auto select kernel when starting jupyter (#8914) Dec 9, 2019
package.nls.pl.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.pt-br.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.ru.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.tr.json Prettier Feb 20, 2020
package.nls.zh-cn.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.zh-tw.json Added diagnostic asking users to delete pythonPath from their workspa… Apr 22, 2020
pvsc.code-workspace Remove ui tests (#10215) Feb 20, 2020
requirements.in Update to Jedi 0.17 (#11252) Apr 21, 2020
requirements.txt Update to Jedi 0.17 (#11252) Apr 21, 2020
tsconfig.datascience-ui.json Fix formatting of json files Feb 25, 2020
tsconfig.extension.json Prelimnary support to load ipyn files in native Notebook editor (#11841) May 15, 2020
tsconfig.json Prelimnary support to load ipyn files in native Notebook editor (#11841) May 15, 2020
tsfmt.json Prettier Feb 20, 2020
tslint.json Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
vscode-python-signing.csproj VS Python analysis engine integration (#1231) Mar 30, 2018

README.md

Python extension for Visual Studio Code

A Visual Studio Code extension with rich support for the Python language (for all actively supported versions of the language: 2.7, >=3.5), including features such as IntelliSense, linting, debugging, code navigation, code formatting, Jupyter notebook support, refactoring, variable explorer, test explorer, snippets, and more!

Quick start

Set up your environment

  • Select your Python interpreter by clicking on the status bar

  • Configure the debugger through the Debug Activity Bar

  • Configure tests by running the Configure Tests command

Jupyter Notebook quick start

  • Open or create a Jupyter Notebook file (.ipynb) and start coding in our Notebook Editor!

For more information you can:

Useful commands

Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:

Command Description
Python: Select Interpreter Switch between Python interpreters, versions, and environments.
Python: Start REPL Start an interactive Python REPL using the selected interpreter in the VS Code terminal.
Python: Run Python File in Terminal Runs the active Python file in the VS Code terminal. You can also run a Python file by right-clicking on the file and selecting Run Python File in Terminal.
Python: Select Linter Switch from Pylint to Flake8 or other supported linters.
Format Document Formats code using the provided formatter in the settings.json file.
Python: Configure Tests Select a test framework and configure it to display the Test Explorer.

To see all available Python commands, open the Command Palette and type Python.

Feature details

Learn more about the rich features of the Python extension:

  • IntelliSense: Edit your code with auto-completion, code navigation, syntax checking and more

  • Linting: Get additional code analysis with Pylint, Flake8 and more

  • Code formatting: Format your code with black, autopep or yapf

  • Debugging: Debug your Python scripts, web apps, remote or multi-threaded processes

  • Testing: Run and debug tests through the Test Explorer with unittest, pytest or nose

  • Jupyter Notebooks: Create and edit Jupyter Notebooks, add and run code cells, render plots, visualize variables through the variable explorer, visualize dataframes with the data viewer, and more

  • Environments: Automatically activate and switch between virtualenv, venv, pipenv, conda and pyenv environments

  • Refactoring: Restructure your Python code with variable extraction, method extraction and import sorting

Supported locales

The extension is available in multiple languages: de, en, es, fa, fr, it, ja, ko-kr, nl, pl, pt-br, ru, tr, zh-cn, zh-tw

Questions, issues, feature requests, and contributions

  • If you have a question about how to accomplish something with the extension, please ask on Stack Overflow
  • If you come across a problem with the extension, please file an issue
  • Contributions are always welcome! Please see our contributing guide for more details
  • Any and all feedback is appreciated and welcome!
    • If someone has already filed an issue that encompasses your feedback, please leave a 👍/👎 reaction on the issue
    • Otherwise please file a new issue
  • If you're interested in the development of the extension, you can read about our development process

Data and telemetry

The Microsoft Python Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. This extension respects the telemetry.enableTelemetry setting which you can learn more about at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.

You can’t perform that action at this time.