Skip to content

Terminal shouldn't be focused if file cannot be run #24382

@injust

Description

@injust

Behaviour

The "Python: Run Python File" commands focus the terminal unnecessarily if the file cannot be run.

Steps to reproduce:

  1. Enable "Python › Terminal: Focus After Launch" (python.terminal.focusAfterLaunch)
  2. Create an unsaved Python file or a saved non-Python file
  3. Run the "Python: Run Python File" command
  4. You get the error message "The active file needs to be saved before it can be run" or "The active file is not a Python source file", but the terminal still becomes focused

Metadata

Metadata

Assignees

Labels

area-terminalbugIssue identified by VS Code Team member as probable bugneeds spikeLabel for issues that need investigation before they can be worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions