0

The Python vscode extension allows us to select venv as well as python interpreters. I seems like the Python extension is only started when opening a .py file. So before that, it is not possible to use it to switch env. I would like to create a vscode extension allowing me to do the same for other types of files. (so without the need of opening a .py file) Is this possible? How should it be done?

Thx a lot,

B3th4
  • 113
  • 1
  • 2
  • 10

2 Answers2

0

If you read the activationEvents section, https://github.com/microsoft/vscode-python/blob/main/package.json#L59 you know that a lot of things can trigger the extension to load, such as adding certain files to the workspace, setup.py for example.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
0

what I was looking for is adding

"extensionDependencies": [
    "ms-python.python"
],

in the package.json of my extension

B3th4
  • 113
  • 1
  • 2
  • 10