8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Always prefer to write Python code over TypeScript code. Not only does that give us more opportunity to use the extension ourself but it makes it easier for our users to contribute back.
Follow PEP 8 and use Ruff extension.
pip-compile --generate-hashes
requirements.txt
Use Prettier.
!
undefined
null
package.json
vscode
@types/vscode
Do note that building the extension is to discover compiler issues, not to specifically launch the extension in a Development Extension Host window (press F5).
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 # Windows: # cmd: ".venv/Scripts/activate.bat" # PS: & ".venv/Scripts/Activate.ps1" # gitbash/bash: source .venv/Scripts/activate # Linux/Mac: # bash/zsh: source .venv/bin/activate # PS: & ".venv/bin/Activate.ps1"
Linux/Mac (sh/bash):
source .venv/bin/activate .venv/bin/python -m pip install nox nox --session setup_repo
Linux/Mac (PS):
& ".venv/bin/Activate.ps1" .venv/bin/python -m pip install nox nox --session setup_repo
Windows (PS):
& ".venv/Scripts/Activate.ps1" .venv/Scripts/python -m pip install nox nox --session setup_repo
To build without translations, set the DISABLE_TRANSLATIONS environment variable to true.
DISABLE_TRANSLATIONS
true
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.
The engine "vscode" appears to be invalid.
python3
python
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).
Compile
CTRL+SHIFT+B
⇧⌘B
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.
npm run clean
rm -r out
To build the web version of the extension, run the following command.
npx gulp webpack
Follow these steps to incorporate a proposed API into your extension:
Enable the Proposed API in Your Extension: Refer to the official guide for enabling proposed APIs in a VS Code extension: Using Proposed API.
Add Your Extension's Dependency to the Proposed API: Update the vscode-distro repository to include your extension's dependency on the proposed API. Use this example PR as a reference: Example PR in vscode-distro.
vscode-distro
Wait for the vscode-distro PR to Be Merged: Once the vscode-distro PR is merged, note the new hash generated from the merged changes.
Update VS Code to Pull the Latest Distro Changes: Update the distro field in the package.json file in the vscode repository to use the new hash. Use this example PR as a reference: Example PR in vscode.
distro