Skip to content
Kartik Raj edited this page Feb 12, 2021 · 20 revisions

Prerequisites

  1. Node.js 12.20
  2. Python 2.7 or later
  3. Windows, macOS, or Linux
  4. Visual Studio Code
  5. The following VS Code extensions:
  6. Have an issue which has a "needs PR" label (feel free to indicate you would like to provide a PR for the issue so others don't work on it as well)

Guidelines

  • Do lean into TypeScript's types; typing is good. 😄
  • Do not silence ESLint warnings unnecessarily; have justifications as to why.
  • Do not rely on the ! operator, if possible; assume the typing is correct.
  • Do use undefined when necessary; do not use null.

Building

git clone https://github.com/microsoft/vscode-python
cd vscode-python
npm ci
python3 -m venv .venv
# Activate the virtual environment as appropriate for your shell, For example, If you're on cmd, you can use...
# ".venv/Scripts/activate.bat"
# On bash/zsh it's ...
source .venv/bin/activate
# The Python code in the extension is formatted using Black.
python3 -m pip install black
# Install Python dependencies using `python3`. If it fails, it'll fallback to using `python` instead which also works.
# If you want to use a different interpreter then specify it in the
# CI_PYTHON_PATH environment variable.
npx gulp installPythonLibs

If you see warnings that The engine "vscode" appears to be invalid., you can ignore these. If python3 is not available for some reason, you can use python instead.

Incremental Build

Run the Compile build task from the Run Build Task... command picker (short cut CTRL+SHIFT+B or ⇧⌘B). This will leave build task running in the background and which will re-run as files are edited and saved. You can see the output from either task in the Terminal panel (use the selector to choose which output to look at).

You can also compile from the command-line. For a full compile you can use:

npx gulp prePublishNonBundle

For incremental builds you can use the following commands depending on your needs:

npm run compile

Sometimes you will need to run npm run clean and even rm -r out. This is especially true if you have added or removed files.

Clone this wiki locally