Run python file in terminal ignores default terminal
See original GitHub issueEnvironment data
- VS Code version: 1.60
- Extension version (available under the Extensions sidebar): v2021.9.1191016588
- OS and version: Windows 10
- Python version (& distribution if applicable, e.g. Anaconda): 3.8 with Anaconda
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Relevant/affected Python packages and their versions: None
- Relevant/affected Python-related VS Code extensions and their versions: None
- Value of the
python.languageServer
setting: Pylance
Expected behavior
By clicking “Run Python File in Terminal” a new terminal instance of the default terminal is started and the code is executed with the selected env.
Actual behavior
Since the latest version, on a windows machine, a new terminal instance of the PowerShell is started regardless of the default terminal. Is this the expected behavior?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:6
Top Results From Across the Web
VSCode's "Run Python File" button doesn't sync with default ...
I have set my default terminal as cmd in VSCode however, everytime I press "Run Python File" button on top right corner it...
Read more >unittest — Unit testing framework — Python 3.11.1 ...
Source code: Lib/unittest/__init__.py(If you are already familiar with the basic concepts of testing, you might want to skip to the list of assert...
Read more >django-admin and manage.py
Run django-admin help --commands to display a list of all available commands. Run django-admin help <command> to display a description of the given...
Read more >Command Line Arguments for Your Python Script
In macOS or Linux, you have the Terminal or xterm. Running a Python script in command line is powerful because you can pass...
Read more >Windows Terminal General Profile Settings - Microsoft Learn
json file, to declare this path, you can use the Browse... button to select your starting directory or enter the WSL path as:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can reproduce the issue, thanks. It seems @bpmckim is right and it’s a VSCode issue 🙂
We use the API
vscode.window.createTerminal
to create a new terminal, which we expect to respect the default terminal setting, but it seems that’s not happening. Opened an issue on VSCode https://github.com/microsoft/vscode/issues/132583.Can confirm,
VS Code: 1.60 Vs Code Python: v2021.9.1191016588
User settings:
Workspace settings:
Weird behaviour:
Run Python file in terminal
→ PowershellDebug Python file in terminal
→ Git Bash as expectedKinda annoying…
cheers flash ⚡