If I run a Python script using the "Run Python File" button (the ▶️ icon in the top right corner of VS Code), the following is executed in the terminal:
PS <ProjectFolder> "C:\Program Files\Python312\python.exe" <scriptPath>
However, this does not work correctly in PowerShell because the & call operator is missing.
When I disable the vscode-python-enviroments extension, the script is run as expected:
PS <ProjectFolder> &"C:\Program Files\Python312\python.exe" <scriptPath>
This means that the extension causes the & to be omitted when launching the Python script, which results in incorrect execution.
Environment Info:
VS Code Version: 1.98.2
Extension:
Identifier: ms-python.vscode-python-envs
Version: 0.3.10731009
Last Updated: 2025-04-02, 13:30:39
Python Path: C:\Program Files\Python312\python.exe
OS: Windows 11