You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Latest VS Code terminal settings for Windows Command Prompt cause "Start REPL" to fail #16169
Extension version (available under the Extensions sidebar): 2021.4.765268190
OS and version: Windows 10
Python version (& distribution if applicable, e.g. Anaconda): 3.9.5
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
Relevant/affected Python packages and their versions: N/A
Relevant/affected Python-related VS Code extensions and their versions: N/A
Value of the python.languageServer setting: Pylance
[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
Expected behaviour
The REPL starts.
Actual behaviour
The REPL fails to start because PowerShell syntax is used ("& D:/Python/Python39/python.exe"), and Command Prompt doesn't understand this (error message: "& was unexpected at this time.").
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Use VS Code's new terminal settings to make Command Prompt the default terminal:
Use the "Python: Start REPL" command (or the "Python: Run Selection/Line In Terminal" command) to start python in a terminal.
The problem does not occur if PowerShell is selected as the default terminal, or if the now deprecated terminal setting is used to select Command Prompt ("terminal.integrated.shell.windows": "${env:windir}\\Sysnative\\cmd.exe").
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Activity
pewscorner commentedon May 7, 2021
Might this be a consequence of vscode issue 123188?
karrtikr commentedon May 10, 2021
Thanks for the bug report! We just wanted to quickly acknowledge we received it and we will triage this as soon as we can.
karrtikr commentedon May 11, 2021
Closing as dup of #16175. Please use the old setting as a workaround until this fixed. #16175 (comment)